home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / ada.doc (.txt) < prev    next >
Microsoft Windows Help File Content  |  1996-01-30  |  899KB  |  15,723 lines

  1.         \uGWAda Help Engine\n
  2.         \vAbout the GWAda Developing Environment\v10.
  3.         \vAbout this help\v11.
  4.         \vEditor Commands & Monitor Information\v12.
  5.         \vTable of contents - LRM\v13.
  6.         \vAlphabetical Index\v14.
  7.         \vHow to use this Help Engine\v15.
  8. \uAbout the GWAda Developing Environment\n
  9. GWAda is a development  environment  built  around the  NYU  AdaEd inter-
  10. preter. It allows  the  editing,  compiling,  binding  and  execution  of
  11. Ada  83 programs.
  12. 1. To compile a program:
  13.    Activate the top menu (F10) and select the Compile option. 
  14. 1.1. To compile the current source:
  15.      Activate the option "Current Unit".
  16.      The source that will be compiled is the one that is being 
  17.      displayed on the screen.
  18.      Be sure to setup properly your  working  directory. This is achieved
  19.      by making of the "Directory" option  within the  "Option"  top  menu
  20.      item.
  21. 1.2. To compile a source that is not being edited
  22.      Activate the option "Select Unit" and enter the file path.
  23.      Examples:  C:\my_prog.ada
  24.                 C:\others\*.ady
  25. Hints: Save the  directory setup  (activate  "Write"  within the "Option"
  26.        top menu item). The setup is saved in your current  directory onto
  27.        file "GWADA.OPT".
  28.        When this file is not present the default setup is  assumed having
  29.        the current directory  as  the " Source Directory"  and  the  sub-
  30.        directory "ada", within the current directory,  as  the  "Library"
  31.        directory.
  32.        Before compiling any program you must create a library.
  33.        To create a library select the "New Library" option  within  the
  34.        "Option" top menu item.
  35. 2. To bind a program select the Bind option (at the top menu). A  set  of
  36.    units available for binding will be shown. Select one  at  each  time.
  37.    The unit selected will then be binded. The  active  binded  units  are
  38.    ready for interpretation.
  39. 3. To run a program select the Run option (at the top  menu).  A  set  of
  40.    units available for interpretation will be shown. Select the  one  you
  41.    want. To modify execution parameters (for the Ada interpreter) use the
  42.    Parameters sub-option within the Options top menu item. To activate
  43.    the monitor use the Parameters sub-option.
  44. \uDisclaimer\n
  45.     This program is distributed free of charges for educational  purposes
  46.     only, but WITHOUT ANY WARRANTY; without even the implied warranty  of
  47.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  48.     Please send your comments and/or suggestions to:
  49.     Dr. Michael B. Feldman
  50.     EECS Department
  51.     The George Washington University
  52.     Washington, D.C. 20052
  53.     mfeldman@seas.gwu.edu
  54.     Dr. Arthur V. Lopes
  55.     Departamento de Engenharia El
  56. trica - Escola Polit
  57. cnica - Pr
  58. dio 30
  59.     Pontif
  60. cia Universidade Cat
  61. lica do Rio Grande do Sul - PUCRS
  62.     Av. Ipiranga 6681
  63.     90620 Porto Alegre - RS / Brazil
  64.     vlopes@vortex.ufrgs.br
  65. \uAbout this Help\n
  66. The LRM (ANSI/MIL-STD-1815A-1983) was transformed into this on-line  help
  67. system for use with the GWAda Development System by:
  68.                                Ulrich Peters
  69.                               Jerry Dressler
  70.                               Rafael Presotto
  71. supervised by
  72.                             Dr. Arthur V. Lopes
  73.      Pontif
  74. cia Universidade Cat
  75. lica do Rio Grande do Sul, Brazil
  76. \uEditor Commands & Monitor Information\n
  77. Here you will find a summary of the operations allowed by the GWada multi
  78. text full screen editor.
  79. The GWAda top menu becomes visible by depressing either the F10 or the
  80. ESC key.
  81. The editor works under two modes of operation: 
  82.         -Insert (Ins)
  83.         -Overwrite (Ovr)
  84. with up to 8 text files (to increase the  number  of  text  files  change
  85. "#define AVL_MAX_WINDOWS     8";  this  define  is  located  within  file
  86. "edit.h").
  87. You may perform cut and paste operations among any of  the  editing  text
  88. files.
  89. To open a text file depress the Alt-F O keys. To  flip  among  open  text
  90. files use the Alt-W keys.
  91. To close the current text file use the Alt-F C  keys.  The  current  text
  92. file is the file whose portion is being displayed onto the screen.
  93. The above operations may also be performed by using the top menu. The top
  94. menu is activated by depressing the F10 key. To  return  to  the  editing
  95. mode depress the ESC key.
  96. You are right now under control of a restricted execution of the  editor.
  97. You can test many of the editor options while you read this text.
  98. The operations allowed are shown below:
  99. Key         Description/Action (Upper and lower case letter keys have
  100.                                 equal meanning)
  101. Arrows      Allow to move the cursor left, right, up and down.
  102. PgUp        Moves the cursor one page up.
  103. PgDn        Moves the cursor one page down.
  104. Home        Moves the cursor to the text line begin.
  105. End         Moves the cursor to the text line end.
  106. Ctrl-V
  107. Ins         Changes from Ins mode to Ovr mode, and
  108.                     from Ovr mode to Ins mode.
  109. Del         Deletes the current character.
  110. Backsp      The backspace key to the left of the current character.
  111. Ctrl-N
  112. ENTER       Creates a new line.
  113. Tab         Insert up to k spaces according to the cursor location. The
  114.             default identation lenght (k) is 4. It can be altered in the 
  115.             Options top menu (Alt-O I). This will also change the 
  116.             formating style when using the F7 key.
  117. F1          Help on Hot Keys.
  118. F5          Go to a specific text line (user is prompted).
  119. F7          Generates package body templates from package specifications. 
  120.             Task body templates are also generated from task
  121.             specifications written within a package spec.
  122.             Before depressing the F7 key first position the cursor over the
  123.             PACKAGE keyword that starts a given package specification. Only
  124.             then depress the F7 key. Answer Y if the template is to be
  125.             appended to the end of the corrent editing text. Otherwise you
  126.             will be prompted for the name of the file that will contain the
  127.             resulting package body template. The template will be inserted
  128.             into this file.
  129.             While this option performs some syntax check,it is assumed that
  130.             the package specification is correct.
  131. F8          Search Help on the LRM. In the editor mode press the F8 key
  132.             when the cursor is over a word. If this word is in the LRM
  133.             index you will be given a menu with the matches for that word.
  134.             Select one of the entries and the related LRM text will be
  135.             displayed.
  136. F10         Brings the GWAda Development Environment Menu (Top Menu).
  137. ESC         Returns to the editing mode from the Top Menu.
  138. Ctrl-y      Deletes the current line (idential to Alt-E D).
  139. Ctrl-g      Deletes current character (identical to Del key).
  140. Ctrl-k b    Mark text's block begin (identical to Alt-E M).
  141.             
  142. ********    The second key, as "b", above should be depressed without
  143.             holding the Ctrl key.
  144. Ctrl-k k    Mark text's block end (identical to Alt-E M).
  145. Ctrl-k c    Copypreviously marked block (same as Alt-E C).
  146. Ctrl-k s    Saves the current file.
  147. Ctrl-D      Moves right.
  148. Ctrl-Left
  149. Ctrl-A      Move back one word.
  150. Ctrl-Right
  151. Ctrl-F      Move forward one word.
  152. Ctrl-Q R    Move to begin of file.
  153. Ctrl-Q C    Move to end of file.
  154. Ctrl-Q Y    Delete from the current position to the line's end.
  155. Alt-F
  156. F2          Activate File menu.
  157. Alt-F O     Opens a file for editing.
  158. Alt-F C     Closes the current file being edited.
  159. Alt-F S     Save the text to disk.
  160. Alt-F I     Shows general information.
  161. Shift-F9
  162. Alt-F D     Starts a DOS shell.
  163. Alt-F Q     Quits the program.
  164. Alt-F4      Quits the program.
  165. Alt-E       Activate Edit menu.
  166. Alt-E I     Inserts a text file to the right of the current cursor
  167.             location.
  168. Alt-E D     Deletes the current line.
  169. Alt-E F     Scans the text looking for the first occurence of a string.
  170. Alt-E R     Perform text replacement.
  171. Alt-E M     Used to mark a block of text for future duplication or
  172.             disk transfer.
  173. Alt-E C     Inserts a previously marked text block.
  174. Alt-E W     Creates a disk file containing a previously marked text
  175.             block.
  176. Alt-E S     Allows the insertion of special ASCII symbols.
  177. Alt-C       Activate Compile menu.
  178. Alt-C C     Compile the current text file.
  179. Alt-C S     Slect a non editing text file for compilation.
  180. Alt-B       Activates the Bind menu.
  181. Alt-R       Activates the Run menu.
  182. Alt-W       Activates the Window menu.
  183. Alt-W n     Sets the text file name, n, as the current editing file.
  184. Alt-O       Activates the Option menu.
  185. Alt-O D     Used to set the source file and library directory.
  186. Alt-O M     Access the monitoring/debugging tools.
  187. Alt-O F     Used to set compiler and interpreter options.
  188. Alt-O C     Allows to customize the editor/environment colors.
  189. Alt-O I     Used to set the identation size (default = 4).
  190. Alt-O R     Reads in the options file previously saved.
  191. Alt-O W     Saves to disk the current options.
  192. ALt-O S     Overwrite current options with the default options.
  193. Alt-A       Activates the Ada menu.
  194.             It allows text insertion of language constructs.
  195. Alt-H       Activates the Help menu.
  196. Alt-H H     Brings the Help engine.
  197. Alt-H F     Show some of the hot keys (same as F1).
  198. Dr. Arthur V. Lopes
  199. Departamento de Engenharia El
  200. trica - Escola Polit
  201. cnica - Pr
  202. dio 30
  203. Pontif
  204. cia Universidade Cat
  205. lica do Rio Grande do Sul - PUCRS
  206. Av. Ipiranga 6681
  207. 90620 Porto Alegre - RS / Brazil
  208. vlopes@vortex.ufrgs.br   lopes@seas.gwu.edu
  209. \uMonitor Information\n
  210.     The GWUMon Parallel Ada Monitor provides a shell around the 
  211. NYUAda Run Time System(RTS).  This monitor allows the user to 
  212. set tasking options for the RTS, and to monitor the execution 
  213. of the RTS.  This monitoring shows the source code for the 
  214. program which is running, or the execution percentage of the 
  215. various tasks of the current program. 
  216. \uIntroduction\n
  217.     This is an introduction to the GWUMon execution shell.  This 
  218. shell allows a user to interact with the NYUAda Run Time System 
  219. (RTS) while the RTS is executing the user program.  This 
  220. interaction with the RTS allows the user to see the program 
  221. statement as they are being executed, and to monitor the CPU 
  222. as the program runs.
  223.     This README file walks the user through an initial run of the 
  224. monitor. Note that there are several Ada programs which are given 
  225. with this distribution. One of them, TEST1.ADA, will be used to 
  226. give a walk through of the system.
  227. \uSystem Setup\n
  228. IF YOU HAVE NOT PREVIOUSLY INSTALLED NYUAda or GWAda 
  229.     If you have never installed NYUAda or GWAda, then use the 
  230. following directions to install the GWUMon system.
  231.     First, make a directory where the programs which will be used 
  232. by GWUMon will be stored, and change to that directory.  It is 
  233. suggested that the directory "ADAED" be used.  Assuming that this 
  234. directory will be named "ADAED" and will be on the "C:" drive, 
  235. this can be done by typing:
  236.     c:
  237.     cd \
  238.     mkdir adaed
  239.     cd c:\adaed
  240.     The programs which install GWUMon are contained in a self 
  241. extracting archive called GWUARC.EXE.  This is a selfextracting 
  242. archieve.  To load the GWUMon system, simply run the archive 
  243. executable.  Assuming that the archive is on the "A:" drive, 
  244. type the following:
  245.     c:
  246.     cd \adaed
  247.     a:\gwuarc
  248.     The GWUMon system should now been installed.  Several system 
  249. variables need to be set or changed to run the ADAED system.  A 
  250. batch program, MONSETUP.BAT, is included with the distribution.  
  251. If you wish, the following instructions will allow you to use the 
  252. GWUMon without modifying this file. Otherwise, this .BAT file will 
  253. give you instructions on what needs to be modified in your 
  254. AUTOEXEC.BAT to allow GWUMon to run.
  255.     If you are not going to modify MONSETUP.BAT, then the 
  256. following instructions will allow you to setup your computer to 
  257. run the monitor. One time only, type the following:
  258.     c:
  259.     cd \adaed
  260.     monsetup
  261.     mkdir myprogs
  262.     cd \adaed\myprogs
  263.     Each time you wish to edit or compile and modify a program, 
  264. always  make sure that you have run monsetup, that you are in the 
  265. "\adaed\myprogs" directory, ie:
  266.     c:
  267.     cd \adaed
  268.     monsetup
  269.     cd myprogs
  270. IF YOU ALREADY HAVE INSTALLED NYUAda or GWAda
  271.     If you already have installed NYUAda or GWAda, you probably are 
  272. familar with how they work.  GWUMon is simply an additional shell to
  273. be used around ADAEXEC.  Therefore, these instructions will assume 
  274. that you are familar with NYUAda.
  275.     First, change to the directory where you have stored NYUAda or 
  276. GWAda. Save the files in this directory.  GWUMon will overwrite all 
  277. the old NYUAda and GWAda files.  Note that GWUMon uses NYUAda as a 
  278. baseline, but it does not work with the unchanged NYUAda programs. 
  279. Do not try to run GWUMon with any NYUAda programs which have not 
  280. come with the GWUMon distribution.
  281.     After you have saved the files in your NYUAda directory, 
  282. unarchive the files from GWUARC.  Since GWUARC is a self 
  283. extracting archive, the files can be retrieve by simply running 
  284. GWUARC from the directory where you wish to place the files.
  285.     Once you have GWUMon installed, all your NYUAda and GWAda 
  286. programs should work as before with only one modification.  
  287. Since GWUMon uses a slightly different AdaEd interpreter, the 
  288. library files are changed slightly.  You should therefore make 
  289. all your libraries new, and you will have to recompile and 
  290. bind all your programs.
  291. \uRunning thr Monitor\n
  292. RUNNING FROM THE COMMAND LINE
  293.     Although GWUMon was written to be integrated into GWAda, it 
  294. can be run standalone from the command line.  If you wish to do 
  295. this, you should make sure that all your compiles include the "-a" 
  296. option, ie:
  297.     adacomp -a -b dummy.ada
  298.     When you run GWUMon, the command line options are exactly the 
  299. same as the options for "adaexec", so you should check the NYUAda 
  300. documentation if you wish to set these options.  Note that if you 
  301. don't set the "-a" option in the compile, the monitor will not 
  302. work.
  303. \uRunning from GWAda\n
  304.     If you are running GWUMon from GWAda, you do not have to worry 
  305. about any compile options, etc.  GWAda sets them for you.  From the 
  306. command line, type "GWAda", and the GWAda system will start up.  
  307.     To run the monitor from GWAda, go to the options menu, and choose 
  308. the option "Run Monitor".  This is a toggle which turns the monitor 
  309. on and off. If you choose not to run the monitor, the NYU AdaExec 
  310. program is run as usual from GWAda.  
  311. \uA First Run of GWUMon\n
  312.     This section will give you a step by step walk through on how to
  313. use GWUMon from GWAda.
  314.     1 - Copy the ada program "TEST1.ADA" from the directory \ADAED
  315.         to the directory \ADAED\MYPROGS
  316.     2 - Start GWAda by typing "GWAda TEST1.ADA"
  317.     3 - The GWAda editor should now be running, with the source for
  318.         the program TEST1.ADA in the window.  First, create a new
  319.         library as follows:
  320.         
  321.         Hit the "ESC" key.
  322.         Type "O" to select the options menu.
  323.         Type "N" to select a new library.
  324.         A New library has been created.
  325.     4 - You should still be on the menu bar.  Type "C" to select
  326.         compile.
  327.     5 - When the compile is done, you will no longer have the menu
  328.         bar.  Type "ESC" to bring up the menu bar, and type "B" to
  329.         bind the program.
  330.     6 - You will be asked for the program to bind.  Select "test1".
  331.         The program is now bound.
  332.     7 - Type "O" to select options again.  Use the down arrow key
  333.         to select the option "Run Monitor".  Hit enter to select
  334.         this option.
  335.     8 - Type "R" to run the program.  When asked what program to
  336.         run, select "test1".
  337.     9 - You should now have up the monitor screen.  We will use all
  338.         the default options, except for the delay.  This is the first
  339.         field.  Set this to 5 by typing a "5" followed by blanks until
  340.         all the "0"'s are gone.  Hit "ESC", and the monitor will 
  341.         start.
  342.     10 - Note that the monitor is now running,  Windows with the 
  343.         source programs should be coming up titled "main", "task1", 
  344.         and "task2".  
  345.     11 - Once all three windows are up, type "CTRL-D" to bring up the
  346.         setup window.  Use the "ENTER" key to go to the Window Type
  347.         field (the last field).  Use the down arrow key to select
  348.         "Two Windows, Vertical".  Hit "ESC" to leave the setup 
  349.         screen.
  350.     12 - The Control screen should now be up.  Use the arrow key to
  351.         go to task1.  Toggle the "Window ON" (WON) using the "t" key.
  352.         Do the same for task2.
  353.     13 - Allow the program to run.  We have now gone through the
  354.         basics of how the monitor program works.
  355. \uGWUMon Options\n
  356.     There are many options which can be set in GWUMon.  The best way 
  357. to find out what they all are is to experiment with the system.  This 
  358. section will give an overview of what the options are, and how to use 
  359. them.
  360. \uSetup Screen\n
  361.     The set up screen is the screen which initially comes up when you
  362.     run GWUMon.  The following can be set from the setup Screen:
  363.     Delay Rate - This is the amount to delay the monitor on each clock 
  364.     cycle. Note that a clock cycle is one pass through the interpreter.
  365.     Cycles for Reporting Exec % - If Type of Monitoring is Exec %, then
  366.     this tells how many cycles to run between reporting.
  367.     Delay time - If the Type of Delay is set to Scaled then this is the 
  368.     number of clock ticks to be interpreted as 1 second.
  369.     RR statments - If Type of Tasking is set to Round Robin, then this 
  370.     is the number of cycles between task switches.
  371.     Type of Tasking - This is the task type model.  It can be set to 
  372.     Round Robin or Run Til Blocked.
  373.     Type of Delay - The type of delay can be either Real ( 1 second is 
  374.     a real time second), or Scaled ( 1 second is some number of clock 
  375.     cycles.
  376.     Type of Monitoring - This can be either None (No monitoring is 
  377.     used), Line (show the lines of code as they are executed ),  or 
  378.     Exec % (show the execution % for each task at the interval 
  379.     specified above).
  380.     Line Trace - Turns Line Tracing on.  This stops the monitor after
  381.     each line on the current monitor screen is executed.
  382.     Task Trace - Turns Task Tracing on.  This stops the monitor after
  383.     each task switch for a task on the current monitor  screen.
  384.     Type of Monitoring Window - Type of window to use  in Line 
  385.     Monitoring  Mode. 
  386.     You can show 1 - 4 tasks in 4 different ways.
  387.     NOTE:  Help for the fields in this screen can be gotten by typing
  388.            a "?".
  389.     The reason a "?" was choosen, rather than the normal "CTRL-H" is 
  390.     that a CTRL-H and BACKSPACE are equivalent, and the BACKSPACE is 
  391.     needed to edit the fields.
  392. \uControl Screen\n
  393.     The Control Screen allows the user to choose which tasks they wish 
  394.     to see on the screen when the monitor is running.  It tells the 
  395.     current status of the tasks, and allows the user to choose which 
  396.     tasks they wish to monitor.  The field WON tells which windows are 
  397.     currently being monitored, if the field is "yes", the task is 
  398.     attatched to a monitor window.  This WON field can be toggled by 
  399.     using the arrow keys to position yourself on the task you want to 
  400.     change, and typing the "t" key.
  401.     If there are more then one screens worth of tasks, then hitting the 
  402.     down arrrow on the last task on the screen will bring up the next 
  403.     series of tasks.
  404. \uOptions when Line Monitor is Running\n
  405.     Line monitoring allows the user to see what lines are being executed
  406.     in each task as they are running.
  407.     Many of the options which are available from the SETUP screen which 
  408.     pertain to line monitoring can be set with a single key stroke while
  409.     the monitor is running.  This is to save the user the time of having 
  410.     to go into the SETUP screen and change the options.  These commands 
  411.     are summarized here:
  412.     Up Arr - doubles the speed of the interpreter (ie. cuts the
  413.              delay in half.)
  414.     Dn Arr - halves the speed of the interpreter (ie. doubles the
  415.              delay.)
  416.     ctrl a - brings up the control screen to allow the user to 
  417.              set the tasks they would like to monitor.
  418.     ctrl b - stops the monitor from running.  This options allows 
  419.              the user to run their program without any monitor output.  
  420.              Note that the delay still is in effect, and the program can 
  421.              be slowed down or sped up.
  422.     ctrl c or ESC - stop the execution of the monitor.
  423.     ctrl d - Brings up the setup screen.
  424.     ctrl h - Brings up the help screen.
  425.     ctrl l - Sets line step mode, where the monitor stops after each
  426.              line that is in a currently active monitor window has been
  427.              executed.
  428.     ctrl t - Sets line task step, where the monitor stops after each
  429.              task switch that is in a currently active monitor window 
  430.              has been executed.
  431.     The status codes for line monitoring are as follows:
  432.         R - Wait on Rendezvous      M - Rendezvous Meet
  433.         D - Wait on Delay           * - Task Ready to Run
  434.         --> Task currently running
  435.     Note that all this information can be obtained by typing "CTRL-H" 
  436.     when the line monitor is running.
  437. \uExecution Percentage Window\n
  438.     The executions percent window allows the user to compare the 
  439.     relative number of clock cycles each task uses.  The only option 
  440.     on this window is to turn the monitoring by using the CTRL-B key.
  441. \uKnown Bugs and Other Hints\n
  442.      There are a number of known bugs and problems which can occur 
  443.      when using the monitor.  These will be fixed for the next 
  444.      release.
  445.     1 - Too many key strokes which are not processed can cause the
  446.         monitor to hang.  For example, if you hit alot of DOWN ARROW
  447.         keys to slow the monitor down, the system will take longer to
  448.         process these keys, and eventually will hang.  If this happens, 
  449.         the computer must be rebooted.
  450.     2 - The monitor comes up but no source lines are displayed and
  451.         the task line is not advanced.  This can be caused by the
  452.         source program not being compiled with the "-a" option.  If
  453.         you are compiling from the command line, make sure you use
  454.         the "-a" option on the compile.
  455. Charles W. Kann 
  456. EECS Department
  457. The George Washington University
  458. Washington, D.C. 20052
  459. ckann@seas.gwu.edu 
  460.    \uTable of contents - LRM\n
  461. 1  \vIntroduction\v100.
  462. 2  \vLexical Elements\v200.
  463. 3  \vDeclarations and Types\v300.
  464. 4  \vNames and Expressions\v400.
  465. 5  \vStatements\v500.
  466. 6  \vSubprograms\v600.
  467. 7  \vPackages\v700.
  468. 8  \vVisibility Rules\v800.
  469. 9  \vTasks\v900.
  470. 10 \vProgram Structure and Compilation Issues\v1000.
  471. 11 \vExceptions\v1100.
  472. 12 \vGeneric Units\v1200.
  473. 13 \vRepresentation Clauses and Implementation Dependent Features\v1300.
  474. 14 \vInput-Output\v1400.
  475.    \uAppendix\n
  476.  A \vPredefined Language Attributes\v1500.
  477.  B \vPredefined Language Pragmas\v1600.
  478.  C \vPredefined Language Environment\v1700.
  479.  D \vGlossary\v1800.
  480.  E \vSyntax Summary\v1900.
  481.  F \vImplementation Dependent Characteristics\v2000.
  482. \uAlphabetical Index\n
  483.  Abnormal Task 
  484. \v A \v20.
  485.  Attribute designator
  486.  BASE predefined attribute)
  487. \v B \v21.
  488.  Box compound delimiter
  489.  CALENDAR (predefined library package)
  490. \v C \v22.
  491.  CURRENT_OUTPUT (text_io function)
  492.  DATA_ERROR (input-output exception)
  493. \v D \v23.
  494.  DURATION (predefined type)
  495.  Effect
  496. \v E \v24.
  497.  External file
  498.  Factor
  499. \v F \v25.
  500.  Function specification
  501.  Garbarge collection
  502. \v G \v26.
  503.  Greater than or equal
  504.  Handler
  505. \v H \v27.
  506.  Hyphen character
  507.  Identifier
  508. \v I \v28.
  509.  Iteration scheme
  510.  Label
  511. \v L \v29.
  512.  Lower case letter
  513.  Machine code insertion
  514. \v M \v30.
  515.  Mutually recursive types
  516.  NAME (input-output function)
  517. \v N \v31.
  518.  NUMERIC_ERROR (predefined exception)
  519.  Object
  520. \v O \v32.
  521.  Overloading
  522.  PACK (predefined pragma)
  523. \v P \v33.
  524.  PUT (text_io procedure)
  525.  Qualification
  526. \v Q \v34.
  527.  Quotation character
  528.  Radix of a floating point type
  529. \v R \v35.
  530.  Run time check
  531.  Safe interval
  532. \v S \v36.
  533.  SYSTEM_NAME (predefined pragma)
  534.  Tabulation
  535. \v T \v37.
  536.  Type with discriminants
  537.  Unary adding operator
  538. \v U \v38.
  539.  USE_ERROR (input-output exception)
  540.  VAL (predefined attribute)
  541. \v V \v39.
  542.  Visible part (of a package)
  543.  Wait
  544. \v W \v40.
  545.  Writing an output file
  546.  Xor operator
  547. \v   \v41.
  548.  YEAR (predefined function)
  549. \u How to use this Help Engine\n
  550.        You can operate this hypertext program  with your keyboard  or  with
  551. a two-button mouse. For best visualibility, you should use a color monitor.
  552.        \uButtons\n
  553. \uF1\n     Returns to the main help window.
  554. \uALT-F1\n Returns to the previous help window, if any.
  555. \n  Allows to select keywords in the current window. 
  556. \uENTER\n  Activates selected keyword, changing the current window.
  557. \uESC\n    Terminates the work with the Help-Engine.
  558.        \uUsing keyboard\n
  559.        To  scroll  the  actual window, you can use the \uPgUp\n / \uPgDn\n keys, as
  560. well as the direction keys (\u
  561. \n and \u
  562. \n). With \uHome\n you can go back to the  top
  563. of the current help text, with \uEnd\n you jump to the end of the text.
  564.        Please note that scrolling is only avaliable  if  the  current  help
  565. text is longer as 18 lines of text. This can be controlled  by  the  slider
  566. \n" at the right border of the window: Only if the slider is present in the
  567. scroll bar, scrolling will be possible.
  568.        You may note that some words are marked  \vlike this\v16.. Those words  are
  569. special terms, which are explained nearer in another help text.  To  go  to
  570. this  specific help  text, simply select the word, pressing the \uTab\n key. If
  571. there  are  more than one keywords present, for each time you press the \uTab\n
  572. key,  the cursor will move one keyword forward. If you press \uShift-Tab\n, the
  573. cursor will move one keyword backwards.  Press \uEnter\n to activate the selec-
  574. ted keyword.
  575.        If you wish to go to the opening screen, press \uF1\n.
  576.        To return to the previous help text, you should press \uAlt-F1\n.
  577.        To finish the work, simply press \uEsc\n.
  578.        \uUsing mouse\n
  579.        To scroll the window, you can place the mouse cursor at  the  scroll
  580. bar, and press a mouse button. The program  will try to place the slider at
  581. the  current mouse  cursor  position. If the  help text is  very short, the
  582. screen may flicker, showing two pages of the current help alternatly.
  583.        You can use the same buttons  at the bottom  of the  window, placing
  584. the cursor over the buttons and pressing a mouse button.
  585.        If you press the left mouse button  over the  word \u
  586. \n,  you  will
  587. move the selection cursor one keyword forward,  pressing  the  right  mouse
  588. button instead, you will move backwards.
  589.        You can also activate the keywords directly with the mouse: you have
  590. only to  move the mouse  cursor  over the word and press a button. The word
  591. will be selected and activated when releasing the mouse button.
  592.        \uNote\n
  593.        Sometimes the buttons are shown "dimmed" in the button bar. This may
  594. occour when the button may not be activated at this moment.
  595. \uThis is only a test.\n
  596. The text you activated does not have any special meaning.
  597. Please use \uAlt-F1\n to return to the previous help text, or \uEsc\n to abort.
  598. You may want to return \vto the previous help text\v15. now.
  599. \u- A -\n
  600. \vAbnormal task\v913.
  601. \vAbort statement\v913.
  602. \vAbs unary operator\v417.
  603. \vAbsolute value operation\v417.
  604. \vAccept alternative (of a selective wait)\v908.
  605. \vAccept statement\v905.
  606. \vAccess to external files\v1402.
  607. \vAccess type\v330.
  608. \vAccess type definition\v330.
  609. \vAccuracy of a numeric operation\v418.
  610. \vAccuracy of a numeric operation of a universal type\v423.
  611. \vActual parameter\v607.
  612. \vActual parameter part\v606.
  613. \vAddition operation\v414.
  614. \vAddition accuracy for a real type\v418.
  615. \vADDRESS (predefined attribute)\v1310.
  616. \vAddress clause\v1305.
  617. \vAFT (predefined attribute) for a fixed point\v320.
  618. \vAft field of text_io input or output\v1416.
  619. \vAggregate\v407.
  620. \vAlignment clause (in a record representation clause)\v1304.
  621. \vAll in a selected component\v404.
  622. \vAllocation of processing resources\v911.
  623. \vAllocator\v421.
  624. \vAllowed\v108.
  625. \vAncestor library unit\v1004.
  626. \vAnonymous type\v306.
  627. \vANSI (american national standards institute)\v201.
  628. \vApostrophe character\v201.
  629.        \vin a character literal\v207.
  630.        \vdelimiter\v202.
  631.        \vin an attribute\v405.
  632.        \vof a qualified expression\v420.
  633. \vApply\v1002.
  634. \vAppropriate for a type\v401.
  635.        \vfor an array type\v402.
  636.        \vfor a record type\v404.
  637.        \vfor a task type\v404.
  638.        \vprefix of an attribute\v405.
  639. \vArbitrary selection of select alternatives\v908.
  640. \vArgument association in a pragma\v210.
  641. \vArgument identifier in a pragma\v210.
  642. \vArithmetic operator\v411.
  643. \vArray aggregate\v409.
  644. \vArray assignment\v503.
  645. \vArray type\v321.
  646. \vArray type definition\v321.
  647. \vArrow compound delimiter\v202.
  648. \vASCII (american standard code for information interchange)\v201.
  649. \vASCII (predefined library package)\v312.
  650. \vAssignment compound delimiter\v202.
  651.        \vin an object declaration\v303.
  652. \vAssignment operation\v502.
  653. \vAssignment statement\v502.
  654. \vAssociated declarative region of a declaration or statement\v801.
  655. \vAttribute\v405.
  656. \vAttribute designator\v405.
  657. \u- B -\n
  658. \vBASE (predefined attribute)\v308.
  659.      \vfor an access type\v332.
  660.      \vfor an array type\v323.
  661.      \vfor a discrete type\v315.
  662.      \vfor a fixed point type\v320.
  663.      \vfor a floating point type\v318.
  664.      \vfor a private type\v706.
  665.      \vfor a record type\v708.
  666. \vBase type (of a subtype)\v305.
  667.      \vas a static subtype\v422.
  668.      \vas target type of a conversion\v419.
  669.      \vdue to elaboration of a type definition\v306.
  670.      \vof an array type 3.6;\v403.
  671.      \vof a derived subtype\v309.
  672.      \vof a discriminant determining the set of choices of a variant part\v328.
  673.      \vof a fixed point type\v319.
  674.      \vof a floating point type\v317.
  675.      \vof a formal parameter of a generic formal subprogram\v1204.
  676.      \vof an integer type\v314.
  677.      \vof a parent subtype\v309.
  678.      \vof a qualified expression\v420.
  679.      \vof a type mark\v307.
  680.      \vof a type mark in a membership test\v413.
  681.      \vof the discrete range in a loop parameter specification\v506.
  682.      \vof the expression in a case statement\v505.
  683.      \vof the result of a generic formal function\v1204.
  684.      \vof the result subtype of a function\v509.
  685.      \vof the subtype indication in an access type definition\v330.
  686.      \vof the type in the declaration of a generic formal object\v1202.
  687.      \vof the type mark in a renaming declaration\v805.
  688. \vBased literal\v206.
  689.      \vas a numeric literal\v204.
  690. \vBasic character\v201.
  691. \vBasic character set\v201.
  692.      \vis sufficient for a program text\v212.
  693. \vBasic declaration\v301.
  694.      \vas a basic declarative item\v333.
  695. \vBasic declarative item\v333.
  696.      \vin a package specification\v701.
  697. \vBasic graphic character\v201.
  698. \vBasic operation\v308.
  699.      \vaccuracy for a real type\v418.
  700.      \vimplicitly declared\v301.
  701.      \vof an access type\v332.
  702.      \vof an array type\v323.
  703.      \vof a derived type\v309.
  704.      \vof a discrete type\v315.
  705.      \vof a fixed point type\v320.
  706.      \vof a floating point type\v318.
  707.      \vof a limited type\v708.
  708.      \vof a private type\v706.
  709.      \vof a record type\v329.
  710.      \vof a task type\v912.
  711.      \vpropagating an exception\v1108.
  712.      \vraising an exception\v1105.
  713.      \vwhich is an attribute\v405.
  714. \uBelong\n
  715.      \vto a range\v310.
  716.      \vto a subtype\v305.
  717.      \vto a subtype of an access type\v330.
  718. \vBinary adding operator\v411.
  719.      \vfor time predefined type\v906.
  720.      \vin a simple expression\v410.
  721.      \voverloaded\v611.
  722. \vBinary operation\v411.
  723. \vBlank skipped by a text_io procedure\v1413.
  724. \vBlock name\v507.
  725.      \vdeclaration\v501.
  726.      \vimplicitly declared\v301.
  727. \vBlock statement\v507.
  728.      \vas a compound statement\v501.
  729.      \vas a declarative region\v801.
  730.      \ventity denoted by an expanded name\v404.
  731.      \vhaving dependent tasks\v904.
  732.      \vincluding an exception handler\v1102.
  733.      \vincluding an implicit declaration\v501.
  734.      \vincluding a suppress pragma\v1109.
  735.      \vraising an exception\v1105.
  736. \vBody\v333.
  737.      \vas a later declarative item\v333.
  738. \vBody stub\v1004.
  739.      \vacting as a subprogram declaration\v603.
  740.      \vas a body\v333.
  741.      \vas a portion of a declarative region\v801.
  742.      \vmust be in the same declarative part as the declaration\v333.
  743. \vBOOLEAN (predefined type)\v313.
  744.      \vderived\v309.
  745.      \vresult of a condition\v504.
  746.      \vresult of an explicitly declared equality operator\v611.
  747. \vBoolean type\v313.
  748.      \voperaion\v315.
  749.      \voperation comparing real operands\v418.
  750. \vBound of an array\v321.
  751.      \vaggregate\v409.
  752.      \vignored due to index_check suppression\v1109.
  753.      \vinitialization in an allocator constrains the allocated object\v421.
  754.      \vresult of an operation\v412.
  755. \vBound of a range\v310.
  756.      \vof a discrete range in a slice\v403.
  757.      \vof a discrete range is of universal_integer type\v322.
  758.      \vof a static discrete range\v422.
  759. \vBound of a scalar type\v310.
  760. \vBound of a slice\v403.
  761. \vBox compound delimiter\v202.
  762.      \vin a generic parameter declaration\v1201.
  763.      \vin an index subtype definition\v321.
  764. \u- C -\n
  765. \vCALENDAR (predefined library package)\v906.
  766. \uCALLABLE (predefined attribute)\n
  767.      \vfor an abnormal task\v913.
  768.      \vfor a task object\v912.
  769. \vCalling conventions of another language system\v1313.
  770. \vCancelation of an entry call statement\v909.
  771. \vCarriage return format effector\v201.
  772. \vCase statement\v505.
  773.      \vas a compound statement\v501.
  774. \vCase statement alternative\v505.
  775. \vCatenation operation\v414.
  776.      \vfor an array type\v323.
  777.      \vin a replacement of a string literal\v212.
  778. \vCatenation operator\v411.
  779. \vCharacter\v201.
  780.      \vin a lexical element\v200.
  781.      \vnames of characters\v201.
  782.      \vreplacement in program text\v212.
  783. \vCHARACTER (predefined type)\v312.
  784.      \vas the component type of the string type\v324.
  785. \vCharacter literal\v207.
  786.      \vas a basic operation\v308.
  787.      \vas an enumeration literal\v311.
  788.      \vas a name\v401.
  789.      \vas a selector\v404.
  790.      \vdeclared by an enumeration literal specification\v301.
  791.      \vin a static expression\v422.
  792.      \vin homograph declarations\v803.
  793.      \vmust be visible at the place of a string literal\v406.
  794. \vCharacter types\v312.
  795.      \voperation\v315.
  796.      \vsubject to an attribute\v315.
  797. \vChoice\v328.
  798.      \vin an aggregate\v407.
  799.      \vin an array aggregate\v409.
  800.      \vin a case statement alternative\v505.
  801.      \vin a component association\v407.
  802.      \vin a record aggregate\v408.
  803.      \vin a variant of a record type definition\v328.
  804. \vCircularity in dependencies between compilation units\v1008.
  805. \vClass of type\v305.
  806.      \vof a derived type\v309.
  807. \vCLOCK (predefined function)\v906.
  808. \uCLOSE (input-output procedure)\n
  809.      \vin an instance of direct_io\v1403.
  810.      \vin an instance of sequential_io\v1403.
  811.      \vin text_io\v1403.
  812. \vClosed alternative (of a selective wait)\v908.
  813. \vClosed file\v1401.
  814. \vCode statement\v1312.
  815.      \vas a simple statement\v501.
  816. \vCOL (text_io function)\v1412.
  817.         \vraising an exception\v1419.
  818. \vCollection (of an access type)\v330.
  819.      \vof a derived access type\v1302.
  820. \vColon character\v201.
  821.      \vreplacing sharp character\v212.
  822. \vColon delimiter\v202.
  823. \vColumn\v1412.
  824. \uComma\n
  825.      \vcharacter\v201.
  826.      \vdelimiter\v202.
  827. \vComment\v209.
  828.      \vin a conforming construct\v604.
  829. \vCommunication of values between tasks\v905.
  830. \vCompatibility (of constraints)\v307.
  831.      \vfailure not causing constraint_error\v1109.
  832.      \vof a discrete range with an index subtype\v322.
  833.      \vof discriminant constraints\v327.
  834.      \vof fixed point constraints\v319.
  835.      \vof floating point constraints\v317.
  836.      \vof index constraints\v322.
  837.      \vof range constraints\v310.
  838. \vCompilation\v1001.
  839.      \vas a sequence of lexical elements\v200.
  840.      \vincluding an inline pragma\v605.
  841. \vCompilation unit\v1001.
  842.      \vcompiled after library units named in its context clause\v1006.
  843.      \vfollowed by an inline pragma\v605.
  844.      \vwith a context clause\v1002.
  845.      \vwith a use clause\v804.
  846. \vCompile time evaluation of expressions\v1009.
  847. \vCompiler\v1007.
  848. \vCompleted block statement\v904.
  849. \vCompleted subprogram\v904.
  850. \vCompleted task\v904.
  851.      \vas recipient of an entry call\v905.
  852.      \vbecoming abnormal\v913.
  853.      \vcompletion during activation\v903.
  854.      \vdue to an exception in the task body\v1105.
  855. \vComponent (of a composite type)\v305.
  856.      \vcombined by aggregate\v407.
  857.      \vdepending on a discriminant\v326.
  858.      \vname starting with a prefix\v401.
  859.      \vof an array\v321.
  860.      \vof a constant\v303.
  861.      \vof a derived type\v309.
  862.      \vof an object\v302.
  863.      \vof a private type\v706.
  864.      \vof a record\v325.
  865.      \vof a variable\v303.
  866.      \vsimple name as a choice\v328.
  867.      \vsubtype\v325.
  868.      \vsubtype itself a composite type\v322.
  869.      \vthat is a task object\v903.
  870.      \vwhose type is a limited type\v708.
  871. \vComponent association\v407.
  872.      \vin an aggregate\v407.
  873.      \vincluding an expression which is an array aggregate\v409.
  874.      \vnamed component association\v407.
  875.      \vnamed component association for selective visibility\v803.
  876.      \vpositional component association\v407.
  877. \vComponent clause (in a record representation clause)\v1304.
  878. \vComponent declaration\v325.
  879.      \vas part of a basic declaration\v301.
  880.      \vhaving an extended scope\v802.
  881.      \vin a component list\v325.
  882.      \vof an array object\v322.
  883.      \vof a record object\v327.
  884.      \vvisibility\v803.
  885. \vComponent list\v325.
  886.      \vin a record type definition\v325.
  887.      \vin a variant\v328.
  888. \vComponent subtype definition\v325.
  889.      \vin a component declaration\v325.
  890. Component type
  891.      \vcatenation with an array type\v414.
  892.      object initialization [see: initial value]
  893.      \vof an expression in an array aggregate\v409.
  894.      \vof an expression in a record aggregate\v408.
  895.      \vof a generic formal array type\v1210.
  896.      \voperation determining a composite type operation\v412.
  897. \vComposite type\v305.
  898.      \vincluding a limited subcomponent\v708.
  899.      \vincluding a task subcomponent\v902.
  900.      \vobject initialization\v303.
  901.      \vof an aggregate\v407.
  902.      \vwith a private type component\v706.
  903. \vCompound delimiter\v202.
  904.      \vnames of delimiters\v202.
  905. \vCompound statement\v501.
  906.      \vincluding the destination of a goto statement\v510.
  907. \vCondition\v504.
  908.      \vdetermining an open alternative of a selective wait\v908.
  909.      \vin an exit statement\v508.
  910.      \vin an if statement\v504.
  911.      \vin a while iteration scheme\v506.
  912. \vConditional compilation\v1009.
  913. \vConditional entry call\v909.
  914.      \vand renamed entries\v805.
  915.      \vsubject to an address clause\v1306.
  916. \vConforming\v604.
  917.      \vdiscriminant parts\v604.
  918.      \vformal parts\v604.
  919.      \vformal parts in entry declarations and accept statements\v905.
  920.      \vsubprogram specifications\v604.
  921.      \vsubprogram specifications in body stub and subunit\v1004.
  922.      \vtype marks\v604.
  923. \vConstant\v303.
  924.      \vaccess object\v330.
  925.      \vformal parameter\v602.
  926.      \vin a static expression\v422.
  927.      \vrenamed\v805.
  928.      \vthat is a slice\v403.
  929. \vConstant declaration\v303.
  930.      \vas a full declaration\v707.
  931.      \vwith an array type\v322.
  932.      \vwith a record type\v327.
  933. CONSTRAINED (predefined attribute)
  934.      \vfor an object of a type with discriminants\v329.
  935.      \vfor a private type\v706.
  936. \vConstrained array definition\v321.
  937.      \vin an object declaration\v302.
  938. \vConstrained array type\v321.
  939. \vConstrained subtype\v305.
  940.      \vdue to elaboration of a type definition\v306.
  941.      \vdue to the elaboration of a derived type definition\v309.
  942.      \vobject declarations\v303.
  943.      \vof a subtype indication in an allocator\v421.
  944. \vConstraint (on an object of a type)\v305.
  945.      \vexplicitly specified by use of a qualification\v420.
  946.      \vin a subtype indication in an allocator\v421.
  947.      \vnot considered in overload resolution\v807.
  948.      \von a derived subtype\v309.
  949.      \von a formal parameter\v602.
  950.      \von a formal parameter of a generic formal subprogram\v1204.
  951.      \von a generic actual parameter\v1207.
  952.      \von a generic formal object\v1202.
  953.      \von a generic formal parameter\v1201.
  954.      \von an object designated by an access value\v330.
  955.      \von a renamed object\v805.
  956.      \von a subcomponent subject to a component clause must be static\v1304.
  957.      \von a subtype of a generic formal type\v1203.
  958.      \von a type mark in a generic parameter declaration\v1207.
  959.      \von a variable\v303.
  960.      \von the result of a generic formal function\v1204.
  961. \vCONSTRAINT_ERROR (predefined exception)\v1101.
  962.      \vraised by an accept statement\v905.
  963.      \vraised by an actual parameter not in the subtype of the formal\v607.
  964.         \vparameter\v607.
  965.      \vraised by an allocator\v421.
  966.      \vraised by an assignment\v502.
  967.      \vraised by an attribute\v315.
  968.      \vraised by a component of an array aggregate\v409.
  969.      \vraised by a component of a record aggregate\v408.
  970.      \vraised by an entry call statement\v905.
  971.      \vraised by a formal parameter not in the subtype of the actual\v607.
  972.         \vparameter\v607.
  973.      \vraised by an index value out of bounds\v402.
  974.      \vraised by a logical operation on arrays of different lengths\v412.
  975.      \vraised by a name with a prefix evaluated to a null access value\v401.
  976.      \vraised by a qualification\v420.
  977.      \vraised by a result of a conversion\v419.
  978.      \vraised by a return statement\v509.
  979.      \vraised by incompatible constraints\v307.
  980.      \vraised by integer exponentiation with a negative exponent\v417.
  981.      \vraised by matching failure in an array  assignment\v503.
  982.      \vraised by naming of a variant not present in a record\v404.
  983.      \vraised by the elaboration of a generic instantiation\v1207.
  984.      \vraised by the initialization of an object\v303.
  985.      \vraised by the result of catenation\v414.
  986. \vContext clause\v1002.
  987.      \vdetermining order of elaboration of compilation units\v1008.
  988.      \vin a compilation unit\v1001.
  989.      \vincluding a use clause\v804.
  990.      \vinserted by the environment\v1007.
  991.      \vof a subunit\v1004.
  992. \vContext of overload resolution\v807.
  993. \vCONTROLLED (predefined pragma)\v421.
  994. \vConversion operation\v419.
  995.      \vapplied to an undefined value\v303.
  996.      \vas a basic operation\v308.
  997.      \vbetween array types\v419.
  998.      \vbetween numeric types\v308.
  999.      \vfrom universal_ fixed type\v416.
  1000.      \vin a static expression\v422.
  1001.      \vof a universal type expression\v502.
  1002.      \vof the bounds of a loop parameter\v506.
  1003.      \vto a derived type\v309.
  1004.      \vto a real type\v418.
  1005. \vConvertible universal operand\v419.
  1006. \vCopy parameter passing\v602.
  1007. \vCOUNT (predefined attribute) for an entry\v912.
  1008. \vCOUNT (predefined integer type)\v1402.
  1009. CREATE (input-output procedure)
  1010.      \vin an instance of direct_io\v1403.
  1011.      \vin an instance of sequential_io\v1403.
  1012.      \vin text_io\v1403.
  1013.      \vraising an exception\v1419.
  1014. \vCurrent column number\v1408.
  1015. \vCurrent index of a direct access file\v1402.
  1016. \vCurrent line number\v1408.
  1017. \vCurrent mode of a file\v1401.
  1018. \vCurrent page number\v1408.
  1019. \vCurrent size of a direct access file\v1402.
  1020. \vCURRENT_INPUT (text_io function)\v1410.
  1021. \vCURRENT_OUTPUT (text_io function)\v1410.
  1022. \u- D -\n
  1023. \vDATA_ERROR (input-output exception)\v1419.
  1024. \vDAY (predefined function)\v906.
  1025. \vDecimal literal\v205.
  1026.      \vas a numeric literal\v204.
  1027. \vDecimal number text_io\v1415.
  1028. \vDeclaration\v301.
  1029.      \vas an overload resolution context\v807.
  1030.      \vdetermined by visibility from an identifier\v803.
  1031.      \vmade directly visible by a use clause\v804.
  1032.      \vof an enumeration literal\v311.
  1033.      \vof a formal parameter\v601.
  1034.      \vof a loop parameter\v506.
  1035.      \voverloaded\v610.
  1036.      \vraising an exception\v1106.
  1037.      \vto which a representation clause applies\v1301.
  1038. \vDeclarative item\v333.
  1039.      \vin a code procedure body\v1312.
  1040.      \vin a declarative part\v333.
  1041.      \vin a package specification\v605.
  1042.      \vin a visible part\v704.
  1043.      \vwhich is a use clause\v804.
  1044. \vDeclarative part\v333.
  1045.      \vin a block statement\v507.
  1046.      \vin a package body\v701.
  1047.      \vin a subprogram body\v603.
  1048.      \vin a task body\v901.
  1049.      \vincluding a generic declaration\v1205.
  1050.      \vincluding an inline pragma\v605.
  1051.      \vincluding an interface pragma\1313.
  1052.      \vincluding a representation clause\v1301.
  1053.      \vincluding a suppress pragma\v1109.
  1054.      \vincluding a task declaration\v903.
  1055.      \vwith implicit declarations\v501.
  1056. \vDeclarative region\v801.
  1057.      \vdetermining the visibility of a declaration\v803.
  1058.      \vformed by the predefined package standard\v806.
  1059.      \vin which a declaration is hidden\v803.
  1060.      \vincluding a full type definition\v706.
  1061.      \vincluding a subprogram declaration\v603.
  1062. \vDefault determination of a representation for an entity\v1301.
  1063. \uDefault expression\n
  1064.      \vcannot include a forcing occurrence\v1301.
  1065.      \vfor a component\v305.
  1066.      \vfor a component of a derived type object\v309.
  1067.      \vfor a discriminant\v326.
  1068.      \vfor a formal parameter\v601.
  1069.      \vfor a formal parameter of a generic formal subprogram\v1201.
  1070.      \vfor a formal parameter of a renamed subprogram or entry\v805.
  1071.      \vfor a generic formal object\v1201.
  1072.      \vfor the discriminants of an allocated object\v421.
  1073.      \vin a component declaration\v325.
  1074.      \vin a discriminant specification\v326.
  1075.      \vincluding the name of a private type\v326.
  1076. \vDefault file\v1410.
  1077. \vDefault generic formal subprogram\v1201.
  1078. \vDefault initial value (of a type)\v305.
  1079.      \vfor an access type object\v330.
  1080.      \vfor a record type object\v325.
  1081. \vDefault initialization (for an object)\v303.
  1082. \vDefault mode (of a file)\v1403.
  1083. \uDefault_aft (fiels length)\n
  1084.         \vof fixed_io or float_io\v1416.
  1085. \uDefault_base\n
  1086.      \vof integer_io\v1415.
  1087. \uDefault-exp (field length)\n
  1088.      \vof fixed_io or float_io\v1415.
  1089. \uDefault_fore (field length)\n
  1090.      \vof fixed_io or float_io\v1418.
  1091. \uDefault_setting (letter case)\n
  1092.      \vof enumeration_io\v1417.
  1093. \uDefault_width (field length)\n
  1094.      \vof enumeration_io\v1417.
  1095.      \vof integer_io\v1415.
  1096. \vDeferred constant\v707.
  1097.      \vof a limited type\v708.
  1098. \vDeferred constant declaration\v704.
  1099.      \vas a basic declaration\v301.
  1100.      \vcannot include a forcing occurrence\v1301.
  1101. \vDelay alternative (of a selective wait)\v908.
  1102. \vDelay expression\v906.
  1103.      \vin a timed entry call\v910.
  1104. \vDelay statement\v906.
  1105.      \vas a simple statement\v501.
  1106.      \vin an abnormal task\v913.
  1107.      \vin a select alternative\v908.
  1108.      \vin a timed entry call\v910.
  1109. \uDELETE (input-output procedure)\n
  1110.      \vin an instance of direct_io\v1403.
  1111.      \vin an instance of sequential_io\v1403.
  1112.      \vin text_io\v1403.
  1113. \vDelimiter\v202.
  1114. \vDelta (of a fixed point type)\v319.
  1115.      \vof universal_fixed\v416.
  1116. \vDELTA (predefined attribute)\v320.
  1117. \vDenote an entity\v301.
  1118. \vDependence between compilation units\v1006.
  1119.      \vcircularity implying illegality\v1008.
  1120. \vDependence on a discriminant\v326.
  1121.      \vaffecting renaming\v805.
  1122.      \vby a subcomponent which is an actual parameter\v602.
  1123.      \veffect on compatibility\v327.
  1124.      \veffect on matching of components\v413.
  1125.      \vfor an assignment\v502.
  1126. \vDependent task\v904.
  1127.      \vdelaying exception propagation\v1105.
  1128.      \vof an abnormal task\v913.
  1129. \uDerivable subprogram\n
  1130.      \vprohibiting representation clauses\v1301.
  1131. \uDerived subprogram\n
  1132.      \vas an operation\v308.
  1133.      \vimplicitly declared\v308.
  1134. \vDerived type\v309.
  1135.      \vconversion to or from a parent type or related type\v419.
  1136.      \vof an access type designating a task type determining task\v904.
  1137.         \vdependence\v904.
  1138.      \vof a boolean type\v309.
  1139.      \vof a limited type\v708.
  1140.      \vof a private type\v705.
  1141.      \vsubject to a representation clause\v1301.
  1142. \vDerived type definition\v309.
  1143. \vDesignate\v330.
  1144. \vDesignated subtype (of an access type)\v330.
  1145. \vDesignated type (of an access type)\v330.
  1146. \vDesignator (of a function)\v601.
  1147.      \vin a function declaration\v411.
  1148.      \vin a subprogram body\v603.
  1149.      \vin a subprogram specification\v601.
  1150.      \vof a generic formal subprogram\v1212.
  1151.      \vof a library unit\v1001.
  1152.      \voverloaded\v610.
  1153. \vDEVICE_ERROR (input-output exception)\v1419.
  1154. \vDigit\v201.
  1155.      \vin a based literal\v206.
  1156.      \vin a decimal literal\v205.
  1157.      \vin an identifier\v203.
  1158. \vDigits (of a floating point type)\v317.
  1159. \vDIGITS (predefined attribute)\v318.
  1160. \vDimensionality of an array\v321.
  1161. \vDirect access file\v1402.
  1162. \vDirect input-output\v1406.
  1163. \vDirect visibility\v803.
  1164.      \vdue to a use clause\v804.
  1165.      \vof a library unit due to a with clause\v1002.
  1166.      \vwithin a subunit\v1004.
  1167. \vDIRECT_IO (predefined input-output generic package)\v1402.
  1168.      \vexceptions\v1419.
  1169.      \vspecification\v1407.
  1170. \vDiscrete range\v321.
  1171.      \vas a choice\v328.
  1172.      \vas a choice in an aggregate\v407.
  1173.      \vfor a loop parameter\v506.
  1174.      \vin a choice in a case statement\v505.
  1175.      \vin a generic formal array type declaration\v1203.
  1176.      \vin an index constraint\v321.
  1177.      \vin a loop parameter specification\v506.
  1178.      \vin a slice\v403.
  1179.      \vof entry indices in an entry declaration\v905.
  1180. \vDiscrete type\v310.
  1181.      \vas a generic actual parameter\v1209.
  1182.      \vas a generic formal type\v1203.
  1183.      \vexpression in a case statement\v505.
  1184.      \vof a discriminant\v326.
  1185.      \vof a loop parameter\v506.
  1186.      \vof index values of an array\v321.
  1187.      \voperation\v315.
  1188. \vDiscriminant\v305.
  1189.      \vin a record aggregate\v408.
  1190.      \vinitialization in an allocator constrains the allocated object\v421.
  1191.      \vof a formal parameter\v602.
  1192.      \vof a generic actual type\v1208.
  1193.      \vof a generic formal type\v1206.
  1194.      \vof an implicitly initialized object\v303.
  1195.      \vof an object designated by an access value\v327.
  1196.      \vof a private type\v706.
  1197.      \vof a variant part must not be of a generic formal type\v328.
  1198.      \vsimple name in a variant part\v328.
  1199.      \vsubcomponent of an object\v303.
  1200.      \vwith a default expression\v326.
  1201. \vDiscriminant association\v327.
  1202.      \vin a discriminant constraint\v327.
  1203.      \vnamed discriminant association\v327.
  1204.      \vnamed discriminant association for selective visibility\v803.
  1205.      \vpositional discriminant association\v327.
  1206. \vDiscriminant constraint\v327.
  1207.      \vignored due to access_check suppression\v1109.
  1208.      \vin an allocator\v421.
  1209.      \von an access type\v330.
  1210.      \vviolated\v1101.
  1211. \vDiscriminant part\v326.
  1212.      \vabsent from a record type declaration\v325.
  1213.      \vas a portion of a declarative region\v801.
  1214.      \vconforming to another\v801.
  1215.      \vin a generic formal type declaration\v326.
  1216.      \vin an incomplete type declaration\v331.
  1217.      \vin a private type declaration\v704.
  1218.      \vin a type declaration\v305.
  1219.      \vmay not include a pragma\v210.
  1220.      \vof a full type declaration is not elaborated\v306.
  1221. \vDiscriminant specification\v326.
  1222.      \vas part of a basic declaration\v301.
  1223.      \vdeclaring a component\v325.
  1224.      \vhaving an extended scope\v802.
  1225.      \vin a discriminant part\v326.
  1226.      \vvisibility\v803.
  1227. \uDivide\n
  1228.      \vcharacter\v201.
  1229.      \vdelimiter\v202.
  1230. \vDivision operation\v416.
  1231.      \vaccuracy for a real type\v418.
  1232. \uDot\n
  1233.      \vcharacter\v201.
  1234.      \vdelimiter\v202.
  1235.      \vdelimiter of a selected component\v803.
  1236. \vDouble dot compound delimiter\v202.
  1237. \vDouble hyphen starting a comment\v209.
  1238. \vDouble star compound delimiter\v202.
  1239. \vDURATION (predefined type)\v906.
  1240.      \vof alternative delay statements\v908.
  1241. \u- E -\n
  1242. \vELABORATE (predefined pragma)\v1008.
  1243. \vElaborated\v333.
  1244. \vElaboration\v333.
  1245.      \voptimized\v1009.
  1246. \vElaboration has no other effect\v301.
  1247. \uElaboration of\n
  1248.      \van access type definition\v330.
  1249.      \van array type definition\v321.
  1250.      \va body stub\v1004.
  1251.      \va component declaration\v325.
  1252.      \va component subtype definition\v325.
  1253.      \va constrained array definition\v321.
  1254.      \va declaration\v301.
  1255.      \va declarative item\v333.
  1256.      \va declarative part\v333.
  1257.      \va deferred constant declaration\v707.
  1258.      \va derived type definition\v309.
  1259.      \va discriminant constraint\v327.
  1260.      \va discriminant part\v326.
  1261.      \va discriminant specification\v326.
  1262.      \van entry declaration\v905.
  1263.      \van enumeration literal specification\v311.
  1264.      \van enumeration type definition\v311.
  1265.      \va fixed point type declaration\v319.
  1266.      \va floating point type declaration\v317.
  1267.      \va formal part\v601.
  1268.      \va full type declaration\v306.
  1269.      \va generic body\v1205.
  1270.      \va generic declaration\v1201.
  1271.      \va generic instantiation\v1206.
  1272.      \van incomplete type declaration\v331.
  1273.      \van index constraint\v322.
  1274.      \van integer type definition\v314.
  1275.      \va library unit\v1008.
  1276.      \va loop parameter specification\v506.
  1277.      \van object declaration\v303.
  1278.      \va package body\v703.
  1279.      \va package declaration\v702.
  1280.      \va parameter specification\v601.
  1281.      \va private type declaration\v705.
  1282.      \va range constraint\v310.
  1283.      \va real type definition\v316.
  1284.      \va record type definition\v325.
  1285.      \va renaming declaration\v805.
  1286.      \va representation clause\v1301.
  1287.      \va subprogram body\v603.
  1288.      \va subprogram declaration\v601.
  1289.      \va subtype declaration\v307.
  1290.      \va subtype indication\v307.
  1291.      \va task body\v901.
  1292.      \va task declaration\v901.
  1293.      \va task specification\v901.
  1294.      \va type declaration\v306.
  1295.      \va type definition \v306.
  1296.      \van unconstrained array definition\v321.
  1297.      \va use clause\v804.
  1298. \vElement in a file\v1400.
  1299.      \vin a direct access file\v1406.
  1300.      \vin a sequential access file\v1404.
  1301. \vELEMENT_TYPE (generic formal type of direct_io)\v1407.
  1302. \vELEMENT_TYPE (generic formal type of sequential_io)\v1405.
  1303. \uElse part\n
  1304.      \vof a conditional entry call\v909.
  1305.      \vof an if statement\v504.
  1306.      \vof a selective wait\v908.
  1307. \vEMAX (predefined attribute)\v318.
  1308. \vEmpty string literal\v208.
  1309. \vEnd of line\v202.
  1310.      \vas a separator\v202.
  1311.      \vdue to a format effector\v202.
  1312.      \vterminating a comment\v209.
  1313. \vEND_ERROR (input-output exception)\v1419.
  1314. END_OF_FILE (input-output function)
  1315.      \vin an instance of direct_io\v1402.
  1316.      \vin an instance of sequential_io\v1404.
  1317.      \vin text_io\v1409.
  1318. \vEND_OF_LINE (text_io function)\v1412.
  1319.      \vraising an exception\v1419.
  1320. \vEND_OF_PAGE (text_io function)\v1412.
  1321. \vEntry (of a task)\v905.
  1322.      \vdeclared by instantiation of a generic formal parameter\v1206.
  1323.      \vdenoted by an indexed component\v402.
  1324.      \vdenoted by a selected component\v404.
  1325.      \vname starting with a prefix\v401.
  1326.      \vof a derived task type\v309.
  1327.      \vof a task designated by an object of a task type\v905.
  1328.      \vrenamed\v805.
  1329.      \vsubject to an address clause\v1305.
  1330.      \vsubject to a representation clause\v1301.
  1331. \vEntry call\v905.
  1332.      \vto an abnormal task\v905.
  1333.      \vto communicate values\v914.
  1334. \vEntry call statement\v905.
  1335.      \vas a simple statement\v501.
  1336.      \vin an abnormal task\v913.
  1337.      \vin a conditional entry call\v909.
  1338.      \vin a timed entry call\v910.
  1339. \vEntry declaration\v905.
  1340.      \vas an overloaded declaration\v803.
  1341.      \vas part of a basic declaration\v301.
  1342.      \vcannot include a forcing occurrence\v1301.
  1343.      \vhaving an extended scope\v802.
  1344.      \vin a task specification\v901.
  1345.      \vincluding the name of a private type\v705.
  1346.      \vvisibility\v803.
  1347. \vEntry family\v905.
  1348.      \vdenoted by a selected component\v404.
  1349.      \vname starting with a prefix\v401.
  1350. \vEntry index (in the name of an entry of a family)\v905.
  1351.      \vfor an open accept alternative\v908.
  1352.      \vin a conditional entry call\v909.
  1353.      \vin a timed entry call\v910.
  1354. \vEntry queue (of calls awaiting acceptance)\v905.
  1355.      \vcount of calls in the queue\v909.
  1356.      \vdue to queued interrupts\v1306.
  1357.      \vof an abnormal task\v913.
  1358. \vEnumeration literal\v311.
  1359.      \vas an operation\v308.
  1360.      \vas an operator\v315.
  1361.      \vas result for image attribute\v315.
  1362.      \vas the parameter for value attribute\v315.
  1363.      \vimplicitly declared\v308.
  1364.      \vin a static expression\v422.
  1365.      \vin pragma system_name\v1308.
  1366.      \vof a derived type\v309.
  1367.      \voverloaded\v803.
  1368.      \vrenamed as a function\v805.
  1369.      \vrepresentation\v1303.
  1370. \vEnumeration literal specification\v311.
  1371.      \vas part of a basic declaration\v301.
  1372.      \vmade directly visible by a use clause\v804.
  1373. \vEnumeration representation clause\v1303.
  1374.      \vas a representation clause\v1301.
  1375. \vEnumeration type\v311.
  1376.      \vas a character type\v312.
  1377.      \vas a generic formal type\v1203.
  1378.      \vas a generic parameter\v1209.
  1379.      \vboolean\v313.
  1380.      \voperation\v315.
  1381.      \vsubject to an attribute\v315.
  1382. \vEnumeration type definition\v311.
  1383. \vENUMERATION_IO (text_io inner generic package)\v1417.
  1384. \vEnvironment of a program\v1007.
  1385.      \venvironment task calling the main program\v1001.
  1386. \vEPSILON (predefined attribute)\v318.
  1387. \uEqual\n
  1388.      \vcharacter\v201.
  1389.      \vdelimiter\v202.
  1390. \vEquality operator\v411.
  1391.      \vexplicitly declared\v413.
  1392.      \vfor an access type\v332.
  1393.      \vfor an array type\v323.
  1394.      \vfor a generic formal type\v1203.
  1395.      \vfor a limited type\v413.
  1396.      \vfor a real type\v418.
  1397.      \vfor a  record type\v329.
  1398. \vErroneous execution\v108.
  1399.      \vdue to an access to a deallocated object\v1315.
  1400.      \vdue to an unchecked conversion violating properties of objects of the\v1316.
  1401.         \vresult type\v1316.
  1402.      \vdue to assignment to a shared variable\v914.
  1403.      \vdue to changing of a discriminant value\v502.
  1404.      \vdue to independence on parameter-passing mechanism\v602.
  1405.      \vdue to multiple address clauses for overlaid entities\v1305.
  1406.      \vdue to suppression of an exception check\v1109.
  1407.      \vdue to use of an undefined value\v303.
  1408. \vError bounds of a predefined operation of a real type\v319.
  1409. \uError detected at\n
  1410.      \vcompilation time\v108.
  1411.      \vrun time\v108.
  1412. \vError situation\v108.
  1413. \vError that may not be detected\v108.
  1414. \vEvaluation (of an expression)\v411.
  1415.      \vat compile time\v422.
  1416.      \vof an actual parameter\v607.
  1417.      \vof an aggregate\v407.
  1418.      \vof an allocator\v421.
  1419.      \vof an array aggregate\v409.
  1420.      \vof a condition\v504.
  1421.      \vof a default expression\v327.
  1422.      \vof a default expression for a formal parameter\v608.
  1423.      \vof a discrete range\v310.
  1424.      \vof a discrete range used in an index constraint\v322.
  1425.      \vof an entry index\v905.
  1426.      \vof an expression in an assignment statement\v502.
  1427.      \vof an expression in a constraint\v307.
  1428.      \vof an expression in a generic actual parameter\v1206.
  1429.      \vof an indexed component\v402.
  1430.      \vof a literal\v406.
  1431.      \vof a logical operation\v412.
  1432.      \vof a name\v401.
  1433.      \vof a name in an abort statement\v913.
  1434.      \vof a name in a renaming declaration\v805.
  1435.      \vof a name of a variable\v502.
  1436.      \vof a primary\v410.
  1437.      \vof a qualified expression\v420.
  1438.      \vof a range\v310.
  1439.      \vof a record aggregate\v408.
  1440.      \vof a short circuit control form\v412.
  1441.      \vof a static expresion\v422.
  1442.      \vof a type conversion\v419.
  1443.      \vof a universal expression\v423.
  1444.      \vof the bounds of a loop parameter\v506.
  1445.      \vof the conditions of a selective wait\v908.
  1446. \vException\v1100.
  1447.      \vas an entity\v301.
  1448.      \vcausing a loop to be exited\v506.
  1449.      \vcausing a transfer of control\v501.
  1450.      \vdue to an expression evaluated at compile time\v1009.
  1451.      \vimplicitly declared in a generic instantiation\v1101.
  1452.      \vin input-output\v1419.
  1453.      \vrenamed\v805.
  1454.      \vsuppress pragma\v1109.
  1455. \vELABORATE (predefined pragma)\v1008.
  1456. \vException choice\v1102.
  1457. \vException declaration\v1101.
  1458.      \vas a basic declaration\v301.
  1459. \vException handler\v1102.
  1460.      \vin an abnormal task\v913.
  1461.      \vin a block statement\v507.
  1462.      \vin a package body\v701.
  1463.      \vin a subprogram body\v603.
  1464.      \vin a task body\v901.
  1465.      \vincluding a raise statement\v1103.
  1466.      \vincluding the destination of a goto statement\v510.
  1467.      \vincluding the name of an exception\v1101.
  1468.      \vnot allowed in a code procedure body\v1312.
  1469.      \vraising an exception\v1105.
  1470.      \vselected to handle an exception\v1105.
  1471. \vException handling\v1104.
  1472. \vException propagation\v1100.
  1473.      \vdelayed by a dependent task\v1105.
  1474.      \vfrom a declaration\v1106.
  1475.      \vfrom a predefined operation\v1108.
  1476.      \vfrom a statement\v1105.
  1477.      \vto a communicating task\v1107.
  1478. Exception raised during execution or elaboration of
  1479.      \van accept statement\v1107.
  1480.      \van allocator of a task\v903.
  1481.      \va conditional entry\v909.
  1482.      \va declaration\v1106.
  1483.      \va declarative part that declares tasks\v903.
  1484.      \va generic instantiation\v1207.
  1485.      \va selective wait\v908.
  1486.      \va subprogram call\v603.
  1487.      \va statement\v1105.
  1488.      \va subprogram call\v603.
  1489.      \va task\v1107.
  1490.      \vtask activation\v903.
  1491.      \va timed entry call\v910.
  1492. \vExceptions and optimization\v1108.
  1493. \vExclamation character\v201.
  1494.      \vreplacing vertical bar\v212.
  1495. \vExit statement\v508.
  1496.      \vas a simple statement\v501.
  1497.      \vcausing a loop to be exited\v506.
  1498.      \vcausing a transfer of control\v501.
  1499.      \vcompleting block statement execution\v904.
  1500. \vExpanded name\v404.
  1501.      \vdenoting a loop\v506.
  1502.      \vin a static expression\v422.
  1503.      \vof a parent unit\v1004.
  1504.      \vreplacing a simple name\v604.
  1505. \vExplicit conversion\v419.
  1506.   type conversion]
  1507.      \vfrom universal_fixed type\v416.
  1508.      \vto a real type\v418.
  1509. \vExplicit declaration\v301.
  1510. \vExponent of a floating point number\v317.
  1511. \uExponent part\n
  1512.      \vin output of real values\v1416.
  1513.      \vof a based literal\v205.
  1514.      \vof a decimal literal\v205.
  1515. \vExponentiating operator\v411.
  1516.      \vin a factor\v410.
  1517.      \voverloaded\v611.
  1518. \vExponentiation compound delimiter\v202.
  1519. \vExponentiation operation\v417.
  1520. \vExpression\v410.
  1521.      \vas an actual parameter\v606.
  1522.      \vas a condition\v504.
  1523.      \vas a generic actual parameter\v1206.
  1524.      \vas the argument of a pragma\v210.
  1525.      \vin an actual parameter of a conditional entry call\v909.
  1526.      \vin an actual parameter of an entry call statement\v905.
  1527.      \vin an actual parameter of a timed entry call\v910.
  1528.      \vin an allocator\v421.
  1529.      \vin an assignment statement\v502.
  1530.      \vin an attribute designator\v405.
  1531.      \vin a case statement\v505.
  1532.      \vin a choice in a case statement\v505.
  1533.      \vin a component association\v407.
  1534.      \vin a component declaration\v325.
  1535.      \vin a constraint\v307.
  1536.      \vin a conversion\v419.
  1537.      \vin a discriminant association\v327.
  1538.      \vin a discriminant specification\v326.
  1539.      \vin a generic formal part\v1201.
  1540.      \vin an indexed component\v402.
  1541.      \vin a length clause\v1302.
  1542.      \vin a name of a variable\v502.
  1543.      \vin a number declaration\v302.
  1544.      \vin an object declaration\v302.
  1545.      \vin a parameter specification\v601.
  1546.      \vin a primary\v410.
  1547.      \vin a qualified expression\v420.
  1548.      \vin a representation clause\v1301.
  1549.      \vin a return statement\v509.
  1550.      \vin a specification of a derived subprogram\v309.
  1551.      \vin a type conversion\v807.
  1552.      \vincluding the name of a private type\v705.
  1553.      \vspecifying an entry in a family\v402.
  1554.      \vspecifying the value of an index\v402.
  1555.      \vwith a boolean result\v412.
  1556. \vExtended_digit in a based literal\v206.
  1557. \vExternal file\v1401.
  1558. \u- F -\n
  1559. \vFactor\v410.
  1560.      \vin a term\v410.
  1561. \vFALSE boolean enumeration literal\v313.
  1562. \vFIELD (predefined integer subtype)\v1413.
  1563. \vFile (object of a file type)\v1401.
  1564. \vFile management\v1403.
  1565.      \vin text_io\v1409.
  1566. \vFile terminator\v1408.
  1567. \uFILE_MODE (input-output type)\n
  1568.      \vin an instance of direct_io\v1401.
  1569.      \vin an instance of sequential_io\v1401.
  1570.      \vin text_io\v1401.
  1571. \uFILE_TYPE (input-output type)\n
  1572.      \vin an instance of direct_io\v1401.
  1573.      \vin an instance of sequential_io\v1401.
  1574.      \vin text_io\v1401.
  1575. \vFIRST (predefined attribute)\v1500.
  1576.      \vfor an access value\v332.
  1577.      \vfor an array type\v323.
  1578.      \vfor a scalar type\v310.
  1579. \vFirst named subtype\v1301.
  1580. \vFIRST_BIT (predefined attribute)\v1310.
  1581. \vFixed accuracy definition\v319.
  1582. \vFixed point constraint\v319.
  1583.      \von a derived subtype\v309.
  1584. \vFixed point predefined types\v319.
  1585. \vFixed point types\v319.
  1586.      \vaccuracy of an operation\v418.
  1587.      \vas a generic actual type\v1209.
  1588.      \vas a generic formal type\v1203.
  1589.      \verror bounds\v418.
  1590.      \voperation\v320.
  1591.      \vresult of an operation out of range of the type\v418.
  1592. \vFIXED_IO (text_io inner generic package)\v1416.
  1593. \vFLOAT (predefined type)\v317.
  1594. \vFLOAT_IO (text_io inner generic package)\v1416.
  1595. \vFloating accuracy definition\v317.
  1596. \vFloating point constraint\v317.
  1597.      \von a derived subtype\v309.
  1598. \vFloating point types\v317.
  1599.      \vaccuracy of an operation\v418.
  1600.      \vas a generic actual type\v1209.
  1601.      \vas a generic formal type\v1203.
  1602.      \verror bounds\v418.
  1603.      \voperation\v318.
  1604.      \vresult of an operation out of range of the type\v418.
  1605. \vFont design of graphical symbols\v201.
  1606. \vForcing occurrence (of a name leading to default determination of\v1301.
  1607.   \vrepresentation)\v1301.
  1608. \vFORE (predefined attribute) for a fixed point type\v320.
  1609. \vFore field of text_io input or output\v1416.
  1610. \uFORM (input-output function)\n
  1611.      \vin an instance of direct_io\v1403.
  1612.      \vin an instance of sequential_io\v1403.
  1613.      \vin text_io\v1403.
  1614.      \vraising an exception\v1419.
  1615. \vForm feed format effector\v201.
  1616. \vForm string of a file\v1401.
  1617. \vFormal parameter\v601.
  1618.   \v(of an entry)\v905.
  1619.   \v(of a function)\v609.
  1620.   \v(of an operator)\v611.
  1621.   \v(of a subprogram)\v601.
  1622.      \vas a constant\v303.
  1623.      \vas an object\v302.
  1624.      \vas a variable\v303.
  1625.      \vnames and overload resolution\v610.
  1626.      \vnames and overload resolution\v610.
  1627.      \vof a derived subprogram\v309.
  1628.      \vof a generic formal subprogram\v1201.
  1629.      \vof a main program\v1001.
  1630.      \vof an operation\v308.
  1631.      \vof a renamed entry or subprogram\v805.
  1632.      \vwhich is of an array type\v322.
  1633.      \vwhich is of a limited type\v708.
  1634.      \vwhich is of a record type\v327.
  1635.      \vwhich is of a task type\v902.
  1636. \vFormal part\v601.
  1637.      \vconforming to another\v604.
  1638.      \vin an accept statement\v905.
  1639.      \vin an entry declaration\v905.
  1640.      \vin a subprogram specification\v601.
  1641.      \vmust not include a pragma\v210.
  1642. \vFormat effector\v201.
  1643.      \vas a separator\v202.
  1644.      \vin an end of line\v202.
  1645. \vFormat of text_io input or output\v1413.
  1646. \vFrame\v1102.
  1647.      \vand optimization\v1108.
  1648.      \vin which an exception is raised\v1105.
  1649. \uFull declaration\n
  1650.      \vof a deferred constant\v707.
  1651. \vFull type declaration\v306.
  1652.      \vdiscriminant part is not elaborated\v306.
  1653.      \vof an incomplete type\v331.
  1654.      \vof a limited private type\v708.
  1655.      \vof a private type\v705.
  1656. \vFunction\v601.
  1657.      \vas a main program\v1001.
  1658.      \vrenamed\v805.
  1659.      \vthat is an attribute\v405.
  1660. \vFunction call\v606.
  1661.      \vas a prefix\v401.
  1662.      \vas a primary\v410.
  1663.      \vin a static expression\v422.
  1664.      \vwith a parameter of a derived type\v309.
  1665.      \vwith a result of a derived type\v309.
  1666. \u- G -\n
  1667. \vGarbage collection\v421.
  1668. \vGeneric actual object\v1207.
  1669. \vGeneric actual parameter\v1206.
  1670.      \vcannot be a universal_fixed operation\v416.
  1671.      \vfor a generic formal access type\v1211.
  1672.      \vfor a generic formal array type\v1210.
  1673.      \vfor a generic formal object\v1202.
  1674.      \vfor a generic formal private type\v1208.
  1675.      \vfor a generic formal scalar type\v1209.
  1676.      \vfor a generic formal subprogram\v1204.
  1677.      \vfor a generic formal type\v1203.
  1678.      \vis not static\v422.
  1679.      \vthat is an array aggregate\v409.
  1680.      \vthat is a loop parameter\v506.
  1681.      \vthat is a task type\v902.
  1682. \vGeneric actual part\v1206.
  1683. \vGeneric actual subprogram\v1204.
  1684. \uGeneric actual type\n
  1685.      \vfor a generic formal access type\v1211.
  1686.      \vfor a generic formal array type\v1210.
  1687.      \vfor a generic formal scalar type\v1209.
  1688.      \vfor a generic formal type with discriminants\v1208.
  1689.      \vfor a generic private formal type\v1208.
  1690.      \vthat is a private type\v705.
  1691. \vGeneric association\v1206.
  1692.      \vnamed generic association\v1206.
  1693.      \vnamed generic association for selective visibility\v803.
  1694.      \vpositional generic association\v1206.
  1695. \vGeneric body\v1205.
  1696.      \vin a package body\v701.
  1697.      \vincluding an exception handler\v1102.
  1698.      \vincluding an exit statement\v508.
  1699.      \vincluding a goto statement\v510.
  1700.      \vincluding an implicit declaration\v501.
  1701.      \vmust be in the same declarative part as the declaration\v333.
  1702.      \vnot yet elaborated at an instantiation\v333.
  1703. \vGeneric declaration\v1201.
  1704.      \vand body as a declarative region\v801.
  1705.      \vand proper body in the same compilation\v1006.
  1706.      \vas a basic declaration\v301.
  1707.      \vas a later declarative item\v333.
  1708.      \vas a library unit\v1001.
  1709.      \vin a package specification\v701.
  1710.      \vrecompiled\v1006.
  1711. \vGeneric formal object\v1201.
  1712.      \vof an array type\v322.
  1713.      \vof a record type\v327.
  1714. \vGeneric formal parameter\v1201.
  1715.      \vas a constant\v303.
  1716.      \vas a variable\v303.
  1717.      \vof a limited type\v708.
  1718.      \vof a task type\v902.
  1719. \vGeneric formal part\v1201.
  1720. \vGeneric formal subprogram\v1201.
  1721.      \vformal function\v1204.
  1722.      \vwith the same name as another\v1206.
  1723. \vGeneric formal type\v1201.
  1724.      \vas index or component type of a generic formal array type\v1210.
  1725.      \vdiscriminant must not be the discriminant of a variant\v328.
  1726.      \vformal access type\v1203.
  1727.      \vformal array type\v1203.
  1728.      \vformal array type (constrained)\v1203.
  1729.      \vformal discrete type\v1203.
  1730.      \vformal enumeration type\v1203.
  1731.      \vformal fixed point type\v1203.
  1732.      \vformal floating point type\v1203.
  1733.      \vformal integer type\v1203.
  1734.      \vformal limited private type\v1203.
  1735.      \vformal limited type\v1203.
  1736.      \vformal part\v1203.
  1737.      \vformal private type\v1203.
  1738.      \vformal private type with discriminants\v1208.
  1739.      \vformal scalar type\v1203.
  1740. \vGeneric instance\v1206.
  1741.      \vinlined in place of each call\v605.
  1742.      \vof a generic package\v1206.
  1743.      \vof a generic subprogram\v1206.
  1744.      \vraising an exception\v1105.
  1745. \vGeneric instantiation\v1206.
  1746.      \vas a basic declaration\v301.
  1747.      \vas a later declarative item\v333.
  1748.      \vas a library unit\v1001.
  1749.      \vbefore elaboration of the body\v333.
  1750.      \vimplicitly declaring an exception\v1101.
  1751.      \vinvoking an operation of a generic actual type\v1203.
  1752.      \vof a predefined input-output package\v1401.
  1753.      \vrecompiled\v1006.
  1754.      \vwith a formal access type\v1211.
  1755.      \vwith a formal array type\v1210.
  1756.      \vwith a formal scalar type\v1209.
  1757.      \vwith a formal subprogram\v1212.
  1758. \vGeneric package\v1201.
  1759.      \vfor input-output\v1400.
  1760.      \vinstantiation\v1206.
  1761.      \vspecification\v1201.
  1762. \vGeneric package body\v1205.
  1763. \vGeneric parameter declaration\v1201.
  1764.      \vas a declarative region\v801.
  1765.      \vhaving an extended scope\v802.
  1766.      \vvisibility\v803.
  1767. \vGeneric specification\v1201.
  1768. \vGeneric subprogram\v1201.
  1769.      \vbody\v1205.
  1770.      \vinstantiation\v1206.
  1771.      \vinterface pragma is not defined\v1313.
  1772.      \vspecification\v1201.
  1773. \vGeneric type definition\v1201.
  1774. \vGeneric unit\v1200.
  1775.      \vincluding an exception declaration\v1101.
  1776.      \vincluding a raise statement\v1103.
  1777.      \vsubject to a suppress pragma\v1109.
  1778.      \vwith a separately compiled body\v1004.
  1779. \vGET (text_io procedure)\v1413.
  1780.      \vfor character and string types\v1414.
  1781.      \vfor enumeration types\v1417.
  1782.      \vfor integer types\v1417.
  1783.      \vfor real types\v1416.
  1784.      \vraising an exception\v1419.
  1785. \vGET_LINE (text_io procedure)\v1414.
  1786. \vGlobal declaration\v801.
  1787.      \vof a variable shared by tasks\v914.
  1788. \vGoto statement\v510.
  1789.      \vas a simple statement\v501.
  1790.      \vcausing a loop to be exited\v506.
  1791.      \vcausing a transfer of control\v501.
  1792.      \vcompleting block statement execution\v904.
  1793. \vGraphic character\v201.
  1794.      \vin a character literal\v207.
  1795.      \vin a string literal\v208.
  1796. \vGraphical symbol\v201.
  1797.      \vnot available\v212.
  1798. \uGreater than\n
  1799.      \vcharacter\v201.
  1800.      \vdelimiter\v202.
  1801. \uGreater than or equal\n
  1802.      \vcompound delimiter\v202.
  1803. \u- H -\n
  1804. \vHandler\v1192.
  1805. \vHiding (of a declaration)\v803.
  1806.      \vand renaming\v805.
  1807.      \vand use clauses\v804.
  1808.      \vdue to an implicit declaration\v501.
  1809.      \vof a generic unit\v1201.
  1810.      \vof a library unit\v1001.
  1811.      \vof a subprogram\v610.
  1812.      \vof or by a derived subprogram\v309.
  1813.      \vof the package standard\v1001.
  1814.      \vwithin a subunit\v1004.
  1815. \vHighest precedence operator\v411.
  1816.      \vas an operation of a discrete type\v315.
  1817.      \vas an operation of a fixed point type\v320.
  1818.      \vas an operation of a floating point type\v318.
  1819.      \voverloaded\v611.
  1820. \vHomograph declaration\v803.
  1821.      \vand use clauses\v804.
  1822. \uHorizontal tabulation\n
  1823.      \vas a separator\v202.
  1824.      \vcharacter in a comment\v209.
  1825.      \vformat effector\v201.
  1826.      \vin text_io input\v1413.
  1827. \vHyphen character\v201.
  1828.      \vstarting a comment\v209.
  1829. \u- I -\n
  1830. \vIdentifier\v203.
  1831.      \vand an adjacent separator\v202.
  1832.      \vas an attribute designator\v405.
  1833.      \vas a designator\v601.
  1834.      \vas a reserved word\v211.
  1835.      \vas a simple name\v401.
  1836.      \vcan be written in the basic character set\v212.
  1837.      \vdenoting an object\v303.
  1838.      \vdenoting a value\v304.
  1839.      \vin a deferred constant declaration\v707.
  1840.      \vin an entry declaration\v905.
  1841.      \vin an exception declaration\v1101.
  1842.      \vin a generic instantiation\v1206.
  1843.      \vin an incomplete type declaration\v1312.
  1844.      \vin a number declaration\v304.
  1845.      \vin an object declaration\v302.
  1846.      \vin a package specification\v701.
  1847.      \vin a private type declaration\v704.
  1848.      \vin a renaming declaration\v805.
  1849.      \vin a subprogram specification\v601.
  1850.      \vin a task specification\v901.
  1851.      \vin a type declaration\v306.
  1852.      \vin its own declaration\v803.
  1853.      \vin pragma system_name\v1307.
  1854.      \vof an argument of a pragma\v210.
  1855.      \vof an enumeration value\v311.
  1856.      \vof a formal parameter of a generic formal subprogram\v1204.
  1857.      \vof a generic formal object\v1201.
  1858.      \vof a generic formal subprogram\v1201.
  1859.      \vof a generic formal type\v1201.
  1860.      \vof a generic unit\v1201.
  1861.      \vof a library unit\v1001.
  1862.      \vof a pragma\v210.
  1863.      \vof a subprogram\v601.
  1864.      \vof a subtype\v307.
  1865.      \vof a subunit\v1004.
  1866.      \vof homograph declarations\v803.
  1867.      \voverloaded\v610.
  1868.      \vversus simple name\v310.
  1869. \vIdentifier list\v302.
  1870.      \vin a component declaration\v325.
  1871.      \vin a deferred constant declaration\v704.
  1872.      \vin a discriminant specification\v326.
  1873.      \vin a generic parameter declaration for generic formal objects\v1201.
  1874.      \vin a number declaration\v302.
  1875.      \vin an object declaration\v302.
  1876.      \vin a parameter specification\v601.
  1877. \vIdentity operation\v415.
  1878. \vIf statement\v504.
  1879.      \vas a compound statement\v501.
  1880. \vIllegal\v108.
  1881. \vIMAGE (predefined attribute)\v315.
  1882. \vImmediate scope\v802.
  1883. \vImplementation defined pragma\v2000.
  1884. \vImplicit conversion\v419.
  1885.      \vof an integer literal to an integer type\v314.
  1886.      \vof a real literal to a real type\v316.
  1887.      \vof a universal expression\v314.
  1888.      \vof a universal real expression\v418.
  1889. \vImplicit declaration\v301.
  1890.      \vby a type declaration\v411.
  1891.      \vhidden by an explicit declaration\v803.
  1892.      \vof a basic operation\v301.
  1893.      \vof a block name, loop name, or label\v501.
  1894.      \vof a derived subprogram\v308.
  1895.      \vof an enumeration literal\v308.
  1896.      \vof an equality operator\v611.
  1897.      \vof an exception due to an instantiation\v1101.
  1898.      \vof a library unit\v806.
  1899.      \vof a predefined operator\v411.
  1900.      \vof universal_fixed operators\v416.
  1901. \uImplicit representation clause\n
  1902.      \vfor a derived type\v309.
  1903. \vIN_FILE (input-output file_mode enumeration literal)\v1401.
  1904. \vIncomplete type\v331.
  1905.      \vcorresponding full type declaration\v306.
  1906. \vIncomplete type declaration\v331.
  1907.      \vas a portion of a declarative region\v801.
  1908. \vIncorrect order dependence\v108.
  1909.      \vassignment statement\v502.
  1910.      \vbounds of a range constraint\v310.
  1911.      \vcomponent association of an array aggregate\v409.
  1912.      \vcomponent association of a record aggregate\v408.
  1913.      \vcomponent subtype indication\v321.
  1914.      \vdefault expression for a component\v303.
  1915.      \vdefault expression for a discriminant\v303.
  1916.      \vexpression\v411.
  1917.      \vindex constraint\v321.
  1918.      \vlibrary unit\v1008.
  1919.      \vparameter association\v606.
  1920.      \vprefix and discrete range of a slice\v403.
  1921. \vIndex\v321.
  1922. \uINDEX (input-output function)\n
  1923.      \vin an instance of direct_io\v1402.
  1924. \vIndex constraint\v321.
  1925.      \vignored due to index_check suppression\v1109.
  1926.      \vin an allocator\v421.
  1927.      \vin a constrained array definition\v321.
  1928.      \vin a subtype indication\v307.
  1929.      \von an access type\v330.
  1930.      \vviolated\v1101.
  1931. \vIndex of an element in a direct access file\v1402.
  1932. \vIndex range\v321.
  1933.      \vmatching\v413.
  1934. \vIndex subtype\v321.
  1935. \vIndex subtype definition\v321.
  1936. \uIndex type\n
  1937.      \vof a choice in an array aggregate\v409.
  1938.      \vof a generic formal array type\v1210.
  1939. \vIndexed component\v402.
  1940.      \vas a basic operation\v308.
  1941.      \vas a name\v401.
  1942.      \vas the name of an entry\v905.
  1943.      \vof a value of a generic formal array type\v1203.
  1944. \vInequality compound delimiter\v202.
  1945. \vInequality operation\v411.
  1946.      \vcannot be explicitly declared\v611.
  1947.      \vfor an access type\v332.
  1948.      \vfor an array type\v323.
  1949.      \vfor a generic formal type\v1203.
  1950.      \vfor a real type\v418.
  1951.      \vfor a real type\v418.
  1952.      \vnot available for a limited type\v708.
  1953. \vInitial value (of an object)\v303.
  1954.      \vin an allocator\v421.
  1955.      \vof an array object\v322.
  1956.      \vof a constant\v303.
  1957.      \vof a constant in a static expression\v422.
  1958.      \vof a discriminant of a formal parameter\v602.
  1959.      \vof a discriminant of an object\v327.
  1960.      \vof a limited private type object\v708.
  1961.      \vof an object declared in a package\v701.
  1962.      \vof an out mode formal parameter\v602.
  1963.      \vof a record object\v327.
  1964. \vINLINE (predefined pragma)\v605.
  1965.      \vcreating recompilation dependence\v1006.
  1966. \vINOUT_FILE (input-output file_mode enumeration literal)\v1401.
  1967. \vInput-output\v1400.
  1968.      \vat device level\v1421.
  1969.      \vexceptions\v1419.
  1970.      \vwith a direct access file\v1406.
  1971.      \vwith a sequential file\v1404.
  1972.      \vwith a text file\v1408.
  1973. \vINTEGER (predefined type)\v314.
  1974.      \vas base type of a loop parameter\v506.
  1975.      \vas default type for the bounds of a discrete range\v322.
  1976. \vInteger literal\v204.
  1977.      \vas a bound of a discrete range\v905.
  1978.      \vas a universal integer literal\v314.
  1979.      \vin based notation\v206.
  1980.      \vin decimal notation\v205.
  1981. \uInteger part\n
  1982.      \vas a base of a based literal\v206.
  1983.      \vof a decimal literal\v205.
  1984. \vInteger predefined type\v314.
  1985. \uInteger subtype\n
  1986.      \vdue to an integer type definition\v314.
  1987. \vInteger type\v314.
  1988.      \vas a generic formal type\v1203.
  1989.      \vas a generic parameter\v1209.
  1990.      \voperation\v315.
  1991.      \vresult of a conversion from a numeric type\v419.
  1992.      \vresult of an operation out of range of the type\v411.
  1993. \vInteger type definition\v314.
  1994. \vINTEGER_IO (text_io inner generic package)\v1414.
  1995. \vINTERFACE (predefined pragma)\v1313.
  1996. \vInterface to other languages\v1313.
  1997. \vInterrupt\v1305.
  1998. \vInterrupt entry\v1306.
  1999. \vIO_EXCEPTIONS (predefined input-output package)\v1419.
  2000.      \vspecification\v1420.
  2001. IS_OPEN (input-output function)
  2002.      \vin an instance of direct_io\v1403.
  2003.      \vin an instance of sequential_io\v1403.
  2004.      \vin text_io\v1403.
  2005. \vISO (international organization for standardization)\v201.
  2006. \vISO seven bit coded character set\v201.
  2007. \vIteration scheme\v506.
  2008. \u- L -\n
  2009. \vLabel\v501.
  2010.      \vdeclaration\v501.
  2011.      \vimplicitly declared\v301.
  2012.      \vlead to by a goto statement\v510.
  2013. \uLabel bracket\n
  2014.      \vcompound delimiter\v202.
  2015. \vLabeled statement\v501.
  2016.      \vin a code statement\v1312.
  2017. \vLARGE (predefined attribute)\v318.
  2018. \vLAST (predefined attribute)\v1500.
  2019.      \vfor an access value\v332.
  2020.      \vfor an array type\v323.
  2021.      \vfor a scalar type\v310.
  2022. \vLAST_BIT (predefined attribute)\v1310.
  2023. \vLater declarative item\v333.
  2024. \vLAYOUT_ERROR (input-output exception)\v1419.
  2025. \vLeading zeros in a numeric literal\v205.
  2026. \vLeft label bracket compound delimiter\v202.
  2027. \uLeft parenthesis\n
  2028.      \vcharacter\v201.
  2029.      \vdelimiter\v202.
  2030. \vLegal\v108.
  2031. \vLENGTH (predefined attribute)\v323.
  2032.      \vfor an access value\v332.
  2033. \vLength clause\v1302.
  2034.      \vas a representation clause\v1301.
  2035.      \vfor an access type\v421.
  2036.      \vspecifying small of a fixed point type\v1302.
  2037. \vLength of a string literal\v208.
  2038. Length of the result
  2039.      \vof an array comparison\v412.
  2040.      \vof an array logical negation\v417.
  2041.      \vof a catenation\v414.
  2042. \uLess than\n
  2043.      \vcharacter\v201.
  2044.      \vdelimiter\v202.
  2045. \uLess than or equal\n
  2046.      \vcompound delimiter\v202.
  2047. \vLetter\v203.
  2048.      \ve or E in a decimal literal\v205.
  2049.      \vin a based literal\v206.
  2050.      \vin an identifier\v203.
  2051. \vLetter_or_digit\v203.
  2052. \vLexical element\v200.
  2053.      \vas a point in the program text\v803.
  2054.      \vin a conforming construct\v604.
  2055.      \vtransferred by a text_io procedure\v1408.
  2056. \vLexicographic order\v413.
  2057. \uLibrary package\n
  2058.      \vhaving dependent tasks\v904.
  2059. \uLibrary package body\n
  2060.      \vraising an exception\v1105.
  2061. \vLibrary unit\v1001.
  2062.      \vcompiled before the corresponding body\v1006.
  2063.      \vfollowed by an inline pragma\v605.
  2064.      \vincluded in the predefined package standard\v806.
  2065.      \vmay not be subject to an address clause\v1305.
  2066.      \vnamed in a use clause\v1008.
  2067.      \vnamed in a with clause\v1002.
  2068.      \vrecompiled\v1006.
  2069.      \vscope\v802.
  2070.      \vsubject to an interface pragma\v1313.
  2071.      \vthat is a package\v701.
  2072.      \vvisibility due to a with clause\v803.
  2073.      \vwhose name is needed in a compilation unit\v1002.
  2074.      \vwith a body stub\v1004.
  2075. \vLimited private type\v708.
  2076.      \vas a generic actual type\v1208.
  2077.      \vas a generic formal type\v1203.
  2078. \vLimited type\v708.
  2079.      \vas a full type\v705.
  2080.      \vcomponent of a record\v325.
  2081.      \vgeneric formal object\v1202.
  2082.      \vin an object declaration\v303.
  2083.      \vlimited record type\v329.
  2084.      \voperation\v329.
  2085.      \vparameters for explicitly declared equality operators\v611.
  2086. \vLine\v1408.
  2087. \vLINE (text_io function)\v1412.
  2088.      \vraising an exception\v1419.
  2089. \vLine feed format effector\v201.
  2090. \vLine length\v1408.
  2091. \vLine terminator\v1408.
  2092. \vLINE_LENGTH (text_io function)\v1411.
  2093.      \vraising an exception\v1419.
  2094. \vLIST (predefined pragma)\v1600.
  2095. \vLiteral\v406.
  2096.      \vas a basic operation\v308.
  2097.      \vof a derived type\v309.
  2098.      \vof universal_integer type\v314.
  2099.      \vof universal_real type\v314.
  2100. \vLocal declaration\v801.
  2101.      \vin a generic unit\v1206.
  2102. \vLogical negation operation\v417.
  2103. \vLogical operation\v412.
  2104. \vLogical operator\v411.
  2105.      \vas an operation of boolean type\v315.
  2106.      \vfor an array type\v323.
  2107.      \vin an expression\v410.
  2108.      \voverloaded\v611.
  2109. \vLogical processor\v900.
  2110. \vLONG_FLOAT (predefined type)\v317.
  2111. \vLONG_INTEGER (predefined type)\v314.
  2112. \vLoop name\v506.
  2113.      \vdeclaration\v501.
  2114.      \vimplicitly declared\v301.
  2115.      \vin an exit statement\v508.
  2116. \vLoop parameter\v506.
  2117.      \vas an object\v302.
  2118. \vLoop parameter specification\v506.
  2119.      \vas an overload resolution context\v807.
  2120.      \vis a declaration\v301.
  2121. \vLoop statement\v506.
  2122.      \vas a compound statement\v501.
  2123.      \vas a declarative region\v801.
  2124.      \ventity denoted by an expanded name\v404.
  2125.      \vincluding an exit statement\v508.
  2126. \vLOW_LEVEL_IO (predefined input-output package)\v1421.
  2127. \vLower case letter\v201.
  2128.      \va to f in a based literal\v206.
  2129.      \ve in a decimal literal\v205.
  2130.      \vin an identifier\v203.
  2131. \u- M -\n
  2132. \vMachine code insertion\v1312.
  2133. \vMachine dependent attribute\v1311.
  2134. \vMACHINE_CODE (predefined package)\v1312.
  2135. \vMACHINE_EMAX (predefined attribute)\v1311.
  2136. \vMACHINE_EMIN (predefined attribute)\v1311.
  2137. \vMACHINE_MANTISSA (predefined attribute)\v1311.
  2138. \vMACHINE_OVERFLOWS (predefined attribute)\v1311.
  2139. \vMACHINE_RADIX (predefined attribute)\v1311.
  2140. \vMACHINE_ROUNDS (predefined attribute)\v1311.
  2141. \vMain program\v1001.
  2142.      \vexecution requiring elaboration of library units\v1008.
  2143.      \vincluded in the predefined package standard\v806.
  2144.      \vincluding a priority pragma\v911.
  2145.      \vraising an exception\v1105.
  2146.      \vtermination\v904.
  2147. \vMANTISSA (predefined attribute)\v318.
  2148. \uMantissa\n
  2149.      \vof a fixed point number\v319.
  2150.      \vof a floating point number\v317.
  2151. \vMaster (task)\v904.
  2152. \uMatching components\n
  2153.      \vof arrays\v413.
  2154.      \vof records\v413.
  2155. \uMatching generic formal\n
  2156.      \vand actual parameters\v1206.
  2157.      \vaccess type\v1211.
  2158.      \varray type\v1210.
  2159.      \vdefault subprogram\v1212.
  2160.      \vobject\v1207.
  2161.      \vprivate type\v1208.
  2162.      \vscalar type\v1209.
  2163.      \vsubprogram\v1212.
  2164.      \vtype\v1208.
  2165. \vMathematically correct result of a numeric operation\v411.
  2166. \vMaximum line length\v1408.
  2167. \vMaximum page length\v1408.
  2168. \vMembership test\v410.
  2169.      \vcannot be overloaded\v611.
  2170. \vMembership test operation\v411.
  2171.      \vas a basic operation\v308.
  2172.      \vfor a real type\v418.
  2173. \vMEMORY_SIZE (predefined pragma)\v1308.
  2174. \uMinus\n
  2175.      \vcharacter in an exponent of a numeric literal\v205.
  2176.      \vdelimiter\v202.
  2177.      \vunary operation\v415.
  2178. \uMODE (input-output function)\n
  2179.      \vin an instance of direct_io\v1403.
  2180.      \vin an instance of sequential_io\v1403.
  2181.      \vin text_io\v1403.
  2182. \vMode (of a file)\v1401.
  2183.      \vof a direct access file\v1402.
  2184.      \vof a sequential access file\v1402.
  2185.      \vof a text_io file\v1409.
  2186. \vMode (of a parameter)\v602.
  2187.      \vof a formal parameter of a derived subprogram\v309.
  2188.      \vof a formal parameter of a renamed entry or subprogram\v805.
  2189.      \vof a generic form object\v1202.
  2190. \vMode in out for a formal parameter\v601.
  2191.      \vof a function\v609.
  2192.      \vof an interrupt entry\v1306.
  2193. \vMode in for a generic formal object\v1202.
  2194. \vMode in for a formal parameter\v601.
  2195.      \vof a function is not allowed\v609.
  2196.      \vof an interrupt entry is not allowed\v1306.
  2197. \vMode in out for a generic formal object\v1202.
  2198. \vMode out for a formal parameter\v601.
  2199.      \vof a function is not allowed\v609.
  2200.      \vof an interrupt entry is not allowed\v1306.
  2201. \vMODE_ERROR (input-output exception)\v1419.
  2202. \vModel interval of a subtype\v418.
  2203. \vModel number (of a real type)\v316.
  2204.      \vaccuracy of a real operation\v418.
  2205.      \vof a fixed point type\v319.
  2206.      \vof a floating point type\v317.
  2207. \vModulus operation\v416.
  2208. \vMONTH (predefined function)\v906.
  2209. \vMultidimensional array\v321.
  2210. \uMultiple\n
  2211.      \vcomponent definition\v325.
  2212.      \vdeferred constant declaration\v704.
  2213.      \vdiscriminant specification\v326.
  2214.      \vgeneric parameter declaration\v1201.
  2215.      \vnumber declaration\v304.
  2216.      \vobject declaration\v601.
  2217.      \vparameter specification\v601.
  2218. \vMultiplication operation\v416.
  2219.      \vaccuracy for a real type\v418.
  2220. \vMultiplying operator\v411.
  2221.      \vin a term\v410.
  2222.      \voverloaded\v611.
  2223. \vMust (legality requirement)\v108.
  2224. \vMutually recursive types\v331.
  2225. \u- N -\n
  2226. \uNAME (input-output function)\n
  2227.      \vin an instance of direct_io\v1403.
  2228.      \vin an instance of sequential_io\v1403.
  2229.      \vin text_io\v1403.
  2230. \vName (of an entity)\v401.
  2231.      \vas a prefix\v401.
  2232.      \vas a primary\v410.
  2233.      \vas the argument of a pragma\v210.
  2234.      \vas the expression in a case statement\v505.
  2235.      \vconflicts\v805.
  2236.      \vdeclared by renaming is not allowed as prefix of certain expanded\v404.
  2237.         \vnames\v404.
  2238.      \vdeclared in a generic unit\v1206.
  2239.      \vdenoting an entity\v401.
  2240.      \vdenoting an object designated by an access value\v401.
  2241.      \vstarting with a prefix\v401.
  2242. \vName string (of a file)\v1401.
  2243. \vNAME_ERROR (input-output exception)\v1419.
  2244. \vNamed association\v608.
  2245. \vNamed number\v302.
  2246.      \vas an entity\v301.
  2247.      \vas a primary\v410.
  2248.      \vin a static expression\v422.
  2249. \vNATURAL (predefined integer subtype)\v1700.
  2250. \vNegation operation (numeric)\v415.
  2251. \uNegative exponent\n
  2252.      \vin a numeric literal\v205.
  2253.      \vto an exponentiation operator\v417.
  2254. \vNEW_LINE (text_io procedure)\v1412.
  2255.      \vraising an exception\v1419.
  2256. \vNEW_PAGE (text_io procedure)\v1412.
  2257.      \vraising an exception\v1419.
  2258. \uNot unary operator\n
  2259.      \vas an operation of an array type\v323.
  2260.      \vas an operation of boolean type\v315.
  2261.      \vin a factor\v410.
  2262. \vNot yet elaborated\v333.
  2263. \vNull access value\v330.
  2264.      \vcausing constraint_error\v410.
  2265.      \vnot causing constraint_error\v1109.
  2266. \vNull array\v322.
  2267.      \vaggregate\v409.
  2268.      \vand relational operation\v413.
  2269.      \vas an operand of a catenation\v414.
  2270. \vNull component list\v325.
  2271. \vNull literal\v330.
  2272.      \vas a basic operation\v308.
  2273.      \vas a primary\v410.
  2274.      \vmust not be the argument of a conversion\v419.
  2275. \vNull range\v310.
  2276.      \vas a choice of a variant part\v328.
  2277.      \vfor a loop parameter\v506.
  2278. \vNull record\v325.
  2279.      \vand relational operation\v413.
  2280. \vNull slice\v403.
  2281. \vNull statement\v501.
  2282.      \vas a simple statement\v501.
  2283. \vNull string literal\v208.
  2284. \vNumber declaration\v302.
  2285.      \vas a basic declaration\v301.
  2286. \vNUMBER_BASE (predefined integer subtype)\v1415.
  2287. \vNumeric literal\v204.
  2288.      \vand an adjacent separator\v202.
  2289.      \vas a basic operation\v308.
  2290.      \vas a primary\v410.
  2291.      \vas the parameter of value attribute\v315.
  2292.      \vas the result of image attribute\v315.
  2293.      \vassigned\v502.
  2294.      \vcan be written in the basic character set\v212.
  2295.      \vin a conforming construct\v604.
  2296.      \vin a static expression\v422.
  2297.      \vin pragma memory_size\v1308.
  2298.      \vin pragma storage_unit\v1308.
  2299. \vNumeric operation of a universal type\v423.
  2300. \vNumeric type\v310.
  2301.      \voperation\v411.
  2302. \uNumeric type expression\n
  2303.      \vin a length clause\v1302.
  2304. \vNumeric value of a number declaration\v302.
  2305. \vNUMERIC_ERROR (predefined exception)\v1101.
  2306.      \vnot raised due to lost overflow conditions\v1315.
  2307.      \vnot raised due to optimization\v1108.
  2308.      \vraised by a numeric operator\v411.
  2309.      \vraised by a predefined integer operation\v314.
  2310.      \vraised by a real result out of range of the safe numbers\v418.
  2311.      \vraised by a universal expression\v423.
  2312.      \vraised by integer division remainder or modulus\v416.
  2313.      \vraised due to a conversion out of range\v314.
  2314. \u- O -\n
  2315. \vObject\v302.
  2316.      \vas an actual parameter\v602.
  2317.      \vas a generic formal parameter\v1202.
  2318.      \vcreated by an allocator\v421.
  2319.      \vcreated by elaboration of an object declaration\v303.
  2320.      \vrenamed\v805.
  2321.      \vsubject to an address clause\v1305.
  2322.      \vsubject to a representation clause\v1301.
  2323.      \vsubject to a suppress pragma\v1109.
  2324. \vObject declaration\v302.
  2325.      \vas a basic declaration\v301.
  2326.      \vas a full declaration\v707.
  2327.      \vimplied by a task declaration\v901.
  2328.      \vin a package specification\v701.
  2329.      \vof an array object\v322.
  2330.      \vof a record object\v327.
  2331.      \vwith a limited type\v708.
  2332.      \vwith a task type\v902.
  2333. \uObject designated\n
  2334.      \vby an access value\v302.
  2335.      \vby an access value denoted by a name\v401.
  2336.      \vby an access-to-array type\v322.
  2337.      \vby an access-to-record type\v327.
  2338.      \vby a generic formal access type value\v1211.
  2339. \uObject module\n
  2340.      \vfor a subprogram written in another language\v1313.
  2341. \vObsolete compilation unit (due to recompilation)\v1006.
  2342. \vOccur immediately within (a declarative region)\v801.
  2343. \vOmitted parameter association for a subprogram call\v608.
  2344. \uOPEN (input-output procedure)\n
  2345.      \vin an instance of direct_io\v1403.
  2346.      \vin an instance of sequential_io\v1403.
  2347.      \vin text_io\v1403.
  2348.      \vraising an exception\v1419.
  2349. \vOpen alternative\v908.
  2350.      \vaccepting a conditional entry call\v909.
  2351.      \vaccepting a timed entry call\v910.
  2352. \vOpen file\v1401.
  2353. \vOperation\v305.
  2354.      \vclassification\v308.
  2355.      \vof an access type\v332.
  2356.      \vof an array type\v323.
  2357.      \vof a discrete type\v315.
  2358.      \vof a fixed point type\v320.
  2359.      \vof a floating point type\v318.
  2360.      \vof a generic actual type\v1203.
  2361.      \vof a generic formal type\v1203.
  2362.      \vof a limited type\v708.
  2363.      \vof a private type\v706.
  2364.      \vof a record type\v329.
  2365.      \vof a subtype\v305.
  2366.      \vof a subtype of a discrete type\v315.
  2367.      \vof a type\v305.
  2368.      \vof a universal type\v423.
  2369.      \vpropagating an exception\v1108.
  2370.      \vsubject to a suppress pragma\v1109.
  2371. \vOperator\v411.
  2372.      \vas an operation\v308.
  2373.      \vimplicitly declared\v308.
  2374.      \vin an expression\v410.
  2375.      \vin a static expression\v422.
  2376.      \vof a derived type\v309.
  2377.      \vof a generic actual type\v1203.
  2378.      \voverloaded\v611.
  2379.      \vrenamed\v805.
  2380. \vOperator declaration\v601.
  2381. \vOperator symbol\v601.
  2382.      \vas a designator\v601.
  2383.      \vas a designator in a function declaration\v411.
  2384.      \vas a name\v401.
  2385.      \vbefore arrow compound delimiter\v803.
  2386.      \vdeclared\v301.
  2387.      \vdeclared in a generic unit\v1206.
  2388.      \vin a renaming declaration\v805.
  2389.      \vin a selector\v404.
  2390.      \vin a static expression\v422.
  2391.      \vnot allowed as the designator of a library unit\v1001.
  2392.      \vof a generic formal function\v1204.
  2393.      \vof homograph declarations\v803.
  2394.      \voverloaded\v611.
  2395. \vOptimization\v1009.
  2396.      \vand exceptions\v1108.
  2397. \vOPTIMIZE (predefined pragma)\v1600.
  2398. \vOrder of application of operators in an expression\v411.
  2399. \vOrder of compilation (of compilation units)\v1001.
  2400.         \vcreating recompilation dependence\v1006.
  2401. \vOrder of copying back of out and in out formal parameters\v606.
  2402. \vOrder of elaboration\v333.
  2403.   \v(of compilation units)\v1008.
  2404. \vOrder of evaluation\v108.
  2405.      \vand exceptions\v1108.
  2406.      \vof conditions in an if statement\v504.
  2407.      \vof default expressions for components\v303.
  2408.      \vof expressions and the name in an assignment statement\v502.
  2409.      \vof operands in an expression\v411.
  2410.      \vof parameter associations in a subroutine call\v606.
  2411.      \vof the bounds of a range\v310.
  2412.      \vof the conditions in a selective wait\v908.
  2413. \vOrdering operator\v411.
  2414. \vOrdering relation\v413.
  2415.      \vfor a real type\v418.
  2416.      \vof an enumeration type preserved by a representation clause\v1303.
  2417.      \vof a scalar type\v310.
  2418. \vOther special character\v210.
  2419. \vOthers\v328.
  2420.      \vas a choice in an array aggregate\v409.
  2421.      \vas a choice in a case statement alternative\v505.
  2422.      \vas a choice in a component association\v407.
  2423.      \vas a choice in a record aggregate\v408.
  2424.      \vas a choice in a variant part\v328.
  2425.      \vas an exception choice\v1102.
  2426. \vOUT_FILE (input-output file_mode enumeration literal)\v1401.
  2427. \vOverflow of real operations\v418.
  2428. \vOverlapping slices in array assignment\v503.
  2429. \vOverlaying of objects or program units\v1305.
  2430. \vOverloading\v803.
  2431.      \vand visibility\v803.
  2432.      \vin an assignment statement\v502.
  2433.      \vin an expression\v410.
  2434.      \vresolution\v610.
  2435.      \vresolution context\v807.
  2436.      \vresolved by explicit qualification\v420.
  2437. \uOverloading of\n
  2438.      \van aggregate\v309.
  2439.      \van allocator\v421.
  2440.      \va declaration\v803.
  2441.      \va designator\v610.
  2442.      \van entry\v905.
  2443.      \van enumeration literal\v311.
  2444.      \va generic formal subprogram\v1206.
  2445.      \va generic unit\v1201.
  2446.      \van identifier\v610.
  2447.      \va library unit by a locally declared subprogram\v1001.
  2448.      \va library unit by means of renaming\v1001.
  2449.      \va literal\v406.
  2450.      \va membership test\v413.
  2451.      \van operator\v411.
  2452.      \van operator symbol\v610.
  2453.      \va subprogram\v610.
  2454.      \va subprogram subject to an interface pragma\v1313.
  2455.      \vthe expression in a case statement\v505.
  2456. \u- P -\n
  2457. \vPACK (predefined pragma)\v1301.
  2458. \vPackage\v700.
  2459.      \vas a generic instance\v1206.
  2460.      \vincluding a raise statement\v1103.
  2461.      \vnamed in a use clause\v804.
  2462.      \vrenamed\v805.
  2463.      \vsubject to an address clause\v1305.
  2464.      \vsubject to representation clause\v1301.
  2465.      \vwith a separately compiled body\v1004.
  2466. \vPackage body\v701.
  2467.      \vas a generic body\v1205.
  2468.      \vas a proper body\v333.
  2469.      \vas a secondary unit\v1001.
  2470.      \vas a secondary unit compiled after the corresponding library unit\v1006.
  2471.      \vin another package body\v701.
  2472.      \vincluding an exception handler\v1102.
  2473.      \vincluding an exit statement\v508.
  2474.      \vincluding a goto statement\v510.
  2475.      \vincluding an implicit declaration\v501.
  2476.      \vmust be in the same declarative part as the declaration\v333.
  2477.      \vraising an exception\v1105.
  2478.      \vrecompiled\v1006.
  2479.      \vsubject to a suppress pragma\v1109.
  2480. \vPackage declaration\v701.
  2481.      \vand body as a declarative region\v801.
  2482.      \vas a basic declaration\v301.
  2483.      \vas a later declarative item\v333.
  2484.      \vas a library unit\v1001.
  2485.      \vdetermining the visibility of another declaration\v803.
  2486.      \velaboration raising an exception\v1106.
  2487.      \vin a package specification\v701.
  2488.      \vrecompiled\v1006.
  2489. \vPackage identifier\v701.
  2490. \vPackage specification\v701.
  2491.      \vin a generic declaration\v1201.
  2492.      \vincluding an inline pragma\v605.
  2493.      \vincluding an interface pragma\v1313.
  2494.      \vincluding a representation clause\v1301.
  2495.      \vincluding a suppress pragma\v1109.
  2496. \vPage\v1412.
  2497. \vPAGE (predefined pragma)\v1600.
  2498. \vPAGE  (text_io function)\v1411.
  2499.      \vraising an exception\v1419.
  2500. \vPage length\v1408.
  2501. \vPage terminator\v1408.
  2502. \vPAGE_LENGTH (text_io function)\v1411.
  2503.      \vraising an exception\v1419.
  2504. \vParagraphing recommended for the layout of programs\v107.
  2505. \vParameter\v1800.
  2506.      \vof a main program\v1001.
  2507. \vParameter and result type profile\v610.
  2508. \vParameter association\v606.
  2509.      \vfor a derived subprogram\v309.
  2510.      \vnamed parameter association\v606.
  2511.      \vnamed parameter association for selective visibility\v803.
  2512.      \vomitted for a subprogram call\v608.
  2513.      \vpositional parameter association\v606.
  2514. \vParameter specification\v601.
  2515.      \vas part of a basic declaration\v301.
  2516.      \vhaving an extended scope\v802.
  2517.      \vin a formal part\v601.
  2518.      \vvisibility\v803.
  2519. \vParameter type profile\v610.
  2520. \vParent subprogram (of a derived subprogram)\v309.
  2521. \vParent subtype (of a derived subtype)\v309.
  2522. \vParent type (of a derived type)\v309.
  2523.      \vdeclared in a visible part\v309.
  2524.      \vof a generic actual type\v1203.
  2525.      \vof a numeric type is predefined and anonymous\v314.
  2526. \vParent unit (of a body stub)\v1004.
  2527.      \vcompiled before its subunits\v1006.
  2528. \uParenthesis\n
  2529.      \vcharacter\v201.
  2530.      \vdelimiter\v202.
  2531. \uParenthesized expression\n
  2532.      \vas a primary\v410.
  2533.      \vin a static expression\v422.
  2534. \vPartial ordering of compilation\v1006.
  2535. \vPercent character\v201.
  2536.      \vreplacing quotation character\v212.
  2537. \vPeriod character\v201.
  2538. \vPhysical processor\v900.
  2539. \uPlus\n
  2540.      \vcharacter\v201.
  2541.      \vdelimiter\v202.
  2542.      \vunary operation\v415.
  2543. \vPoint character\v201.
  2544.      \vin a based literal\v206.
  2545.      \vin a decimal literal\v205.
  2546.      \vin a numeric literal\v204.
  2547. \vPoint delimiter\v202.
  2548. \vPortability\v101.
  2549.   \vof programs using real types\v1311.
  2550. \vPOS (predefined attribute)\v315.
  2551. \vPOSITION (predefined attribute)\v1310.
  2552. Position number
  2553.      \vas parameter to val attribute\v315.
  2554.      \vof an enumeration literal\v311.
  2555.      \vof an integer value\v314.
  2556.      \vof a value of a discrete type\v310.
  2557.      \vreturned by pos attribute\v315.
  2558. \vPosition of an element in a direct access file\v1402.
  2559. \vPositional association\v606.
  2560. \vPOSITIVE (predefined integer subtype)\v324.
  2561.      \vas the index type of the string type\v324.
  2562. \vPOSITIVE_COUNT (predefined integer subtype)\v1407.
  2563. \vPotentially visible declaration\v804.
  2564. \vPound sterling character\v201.
  2565. \vPragma\v210.
  2566.      \vapplicable to the whole of a compilation\v1001.
  2567.      \vargument that is an overloaded subprogram name\v323.
  2568.      \vfor the specification of a subprogram body in another language\v1313.
  2569.      \vfor the specification of program overlays\v1305.
  2570.      \vin a code procedure body\v1312.
  2571.      \vrecommending the representation of an entity\v1301.
  2572.      \vspecifying implementation conventions for code statements\v1312.
  2573. \uPragma (predefined)\n
  2574.      \vCONTROLLED\v421.
  2575.      \vELABORATE\v1008.
  2576.      \vINLINE\v605.
  2577.      \vINTERFACE\v1313.
  2578.      \vLIST\v1600.
  2579.      \vMEMORY_SIZE\v1308.
  2580.      \vOPTIMIZE\v1600.
  2581.      \vPACK\v1301.
  2582.      \vPAGE\v1600.
  2583.      \vPRIORITY\v911.
  2584.      \vSHARED\v914.
  2585.      \vSTORAGE_UNIT\v1308.
  2586.      \vSUPPRESS\v1109.
  2587.      \vSYSTEM_NAME\v1308.
  2588. \vPrecedence\v411.
  2589. \vPRED (predefined attribute)\v315.
  2590. \vPredefined constant\v806.
  2591. \vPredefined exception\v806.
  2592. \vPredefined function\v806.
  2593. \vPredefined generic library function\v806.
  2594. \vPredefined generic library package\v806.
  2595. \vPredefined generic library procedure\v806.
  2596. \vPredefined generic library subprogram\v806.
  2597. \vPredefined identifier\v806.
  2598. \vPredefined library package\v806.
  2599. \vPredefined operation\v305.
  2600.      \vaccuracy for a real type\v418.
  2601.      \vof a discrete type\v315.
  2602.      \vof a fixed point type\v320.
  2603.      \vof a universal type\v423.
  2604.      \vpropagating an exception\v1108.
  2605. \vPredefined operator\v411.
  2606.      \vapplied to an undefined value\v303.
  2607.      \vas an operation\v308.
  2608.      \vfor an access type\v332.
  2609.      \vfor an array type\v323.
  2610.      \vfor a record type\v329.
  2611.      \vimplicitly declared\v308.
  2612.      \vin a static expression\v422.
  2613.      \vof a derived type\v309.
  2614.      \vof a fixed point type\v319.
  2615.      \vof a floating point type\v317.
  2616.      \vof an integer type\v314.
  2617.      \vraising an exception\v1105.
  2618. \vPredefined package\v806.
  2619.      \vfor input-output\v1400.
  2620. \vPredefined subprogram\v806.
  2621. \vPredefined subtype\v806.
  2622. \vPredefined type\v806.
  2623. \vPrefix\v401.
  2624.      \vin an attribute\v405.
  2625.      \vin an indexed component\v402.
  2626.      \vin a selected component\v404.
  2627.      \vin a slice\v403.
  2628.      \vthat is a function call\v401.
  2629.      \vthat is a name\v401.
  2630. \vPrimary\v410.
  2631.      \vin a factor\v410.
  2632.      \vin a static expression\v422.
  2633. \vPRIORITY (predefined integer subtype)\v911.
  2634. \vPRIORITY (predefined pragma)\v911.
  2635. \vPrivate part (of a package)\v702.
  2636. \vPrivate type\v305.
  2637.      \vas a generic actual type\v1208.
  2638.      \vas a generic formal type\v1203.
  2639.      \vas a parent type\v309.
  2640.      \vcorresponding full type declaration\v306.
  2641.      \vformal parameter\v602.
  2642.      \vof a deferred constant\v704.
  2643.      \voperation\v706.
  2644. \vPrivate type declaration\v704.
  2645.      \vas a generic type declaration\v1201.
  2646.      \vas a portion of a declarative region\v801.
  2647.      \vincluding the word 'limited'\v708.
  2648. \vProcedure\v601.
  2649.      \vas a main program\v1001.
  2650.      \vas a renaming of an entry\v905.
  2651.      \vrenamed\v805.
  2652. \uProcedure body\n
  2653.      \vincluding code statements\v1312.
  2654. \vProcedure call\v606.
  2655. \vProcedure call statement\v606.
  2656.      \vas a simple statement\v501.
  2657.      \vwith a parameter of a derived type\v309.
  2658. \vProcessor\v900.
  2659. \vProgram\v1000.
  2660. \vProgram legality\v108.
  2661. \vProgram library\v1001.
  2662.      \vcreation\v1007.
  2663.      \vmanipulation and status\v1007.
  2664. \vProgram optimization\v1008.
  2665. \vProgram text\v202.
  2666. \vProgram unit\v600.
  2667.      \ventity denoted by an expanded name\v404.
  2668.      \vincluding a suppress pragma\v1109.
  2669.      \vsubject to an address clause\v1305.
  2670.      \vwith a separately compiled body\v1004.
  2671. \vPROGRAM_ERROR (predefined exception)\v1101.
  2672.      \vraised by an erroneous program or incorrect order dependence\v108.
  2673.      \vraised by a generic instantiation before elaboration of the body\v333.
  2674.      \vraised by a subprogram call before elaboration of the body\v333.
  2675.      \vraised by a task activation before elaboration of the body\v333.
  2676.      \vraised by reaching the end of a function body\v609.
  2677. \vProper body\v333.
  2678.      \vas a body\v333.
  2679.      \vin a subunit\v1004.
  2680.      \vof a library unit separately compiled\v1001.
  2681. \vPUT (text_io procedure)\v1408.
  2682.      \vfor character and string types\v1414.
  2683.      \vfor enumeration types\v1417.
  2684.      \vfor integer types\v1415.
  2685.      \vfor real types\v1416.
  2686.      \vraising an exception\v1419.
  2687. \u- Q -\n
  2688. \vQualification\v420.
  2689.      \vas a basic operation\v308.
  2690.      \vusing a name of an enumeration type as qualifier\v311.
  2691. \vQualified expression\v420.
  2692.      \vas a primary\v410.
  2693.      \vin an allocator\v421.
  2694.      \vin a case statement\v505.
  2695.      \vin a static expression\v422.
  2696.      \vqualification of an array aggregate\v409.
  2697.      \vto resolve an overloading ambiguity\v610.
  2698. \vQuotation character\v201.
  2699.      \vin a string literal\v208.
  2700.      \vreplacement by percent character\v212.
  2701. \u- R -\n
  2702. \vRadix of a floating point type\v317.
  2703. \vRaise statement\v1103.
  2704.      \vas a simple statement\v501.
  2705.      \vincluding the name of an exception\v1101.
  2706. \vRaising of an exception\v1100.
  2707.      \vcausing a transfer of control\v501.
  2708. \vRange\v310.
  2709.      \vas a discrete range\v321.
  2710.      \vin a record representation clause\v1304.
  2711.      \vin a relation\v410.
  2712.      \vof an index subtype\v321.
  2713.      \vof an integer type containing the result of an operation\v411.
  2714.      \vof a predefined integer type\v314.
  2715.      \vof a real type containing the result of an operation\v418.
  2716.      \vyielded by an attribute\v405.
  2717. \vRANGE (predefined attribute)\v323.
  2718.      \vfor an access value\v332.
  2719.      \vfor an array type\v323.
  2720. \vRange constraint\v310.
  2721.      \vignored due to range_check suppression\v1109.
  2722.      \vin a fixed point constraint\v319.
  2723.      \vin a floating point constraint\v317.
  2724.      \vin an integer type definition\v314.
  2725.      \vin a subtype indication\v310.
  2726.      \von a derived subtype\v309.
  2727.      \vviolated\v1101.
  2728. \uREAD (input-output procedure)\n
  2729.      \vin an instance of direct_io\v1406.
  2730.      \vin an instance of sequential_io\v1404.
  2731. \vReading the value of an object\v602.
  2732. \vReal literal\v204.
  2733.      \vin based notation\v206.
  2734.      \vin decimal notation\v205.
  2735.      \vis of universal_real type\v316.
  2736. \vReal type\v316.
  2737.      \vaccuracy of an operation\v418.
  2738.      \vrepresentation attribute\v1311.
  2739.      \vresult of a conversion from a numeric type\v418.
  2740.      \vresult of an operation out of range of the type\v411.
  2741. \vReal type definition\v316.
  2742. \vRECEIVE_CONTROL (low_level_io procedure)\v1421.
  2743. \vReciprocal operation in exponentiation by a negative integer\v417.
  2744. \vRecompilation\v1006.
  2745. \vRecord aggregate\v408.
  2746.      \vas a basic operation\v308.
  2747.      \vin a code statement\v1312.
  2748. \vRecord representation clause\v1304.
  2749.      \vas a representation clause\v1301.
  2750. \vRecord type\v325.
  2751.      \vformal parameter\v602.
  2752.      \vincluding a limited subcomponent\v708.
  2753.      \voperation\v329.
  2754. \uRecord type declaration\n
  2755.      \vas a declarative region\v801.
  2756.      \vdetermining the visibility of another declaration\v803.
  2757. \vRecord type definition\v307.
  2758. \uRecursive\n
  2759.      \vcall of a subprogram\v601.
  2760.      \vgeneric instantiation\v1201.
  2761.      \vtypes\v331.
  2762. \vReentrant subprogram\v601.
  2763. \vReference (parameter passing)\v602.
  2764. \vRelation (in an expression)\v410.
  2765. \vRelational operation\v413.
  2766.      \vof a boolean type\v313.
  2767.      \vof a discrete type\v315.
  2768.      \vof a fixed point type\v320.
  2769.      \vof a real type\v418.
  2770.      \vof a scalar type\v310.
  2771.      \vresult for real operands\v418.
  2772. \vRelational operator\v411.
  2773.      \vfor an access type\v332.
  2774.      \vfor an array type\v323.
  2775.      \vfor a private type\v706.
  2776.      \vfor a record type\v329.
  2777.      \vfor time predefined type\v906.
  2778.      \vin a relation\v410.
  2779.      \voverloaded\v611.
  2780. \vRem operator\v416.
  2781. \vRemainder operation\v416.
  2782. \vRenaming declaration\v805.
  2783.      \vas a basic declaration\v301.
  2784.      \vas a declarative region\v801.
  2785.      \vcannot rename a universal_fixed operation\v416.
  2786.      \vfor an array object\v322.
  2787.      \vfor an entry\v905.
  2788.      \vfor a record object\v327.
  2789.      \vname declared is not allowed as a prefix of certain expanded names\v404.
  2790.      \vto overload a library unit\v1001.
  2791.      \vto overload a subunit\v1002.
  2792.      \vto resolve an overloading ambiguity\v610.
  2793. \vRendezvous (of tasks)\v905.
  2794.      \vduring which an exception is raised\v1107.
  2795.      \vpriority\v911.
  2796.      \vprohibited for an abnormal task\v913.
  2797. \vReplacement of characters in program text\v212.
  2798. \vRepresentation (of a type and its objects)\v1301.
  2799.      \vrecommendation by a pragma\v1301.
  2800. \vRepresentation attribute\v1310.
  2801.      \vas a forcing occurrence\v1301.
  2802.      \vprefix which has a null value\v401.
  2803. \vRepresentation clause\v1301.
  2804.      \van an overload resolution context\v807.
  2805.      \vas a basic declarative item\v333.
  2806.      \vas a portion of a declarative region\v801.
  2807.      \vcannot include a forcing occurrence\v1301.
  2808.      \vfor a derived type\v309.
  2809.      \vfor a private type\v705.
  2810.      \vimplied for a derived type\v309.
  2811.      \vin an overload resolution context\v807.
  2812.      \vin a task specification\v901.
  2813. \vReserved word\v211.
  2814. \uRESET (input-output procedure)\n
  2815.      \vin an instance of direct_io\v1403.
  2816.      \vin an instance of sequential_io\v1403.
  2817.      \vin text_io\v1403.
  2818. \vResult subtype (of a function)\v601.
  2819.      \vof a return expression\v509.
  2820. \vResult type and overload resolution\v610.
  2821. \vReturn statement\v509.
  2822.      \vas a simple statement\v501.
  2823.      \vcausing a loop to be exited\v506.
  2824.      \vcausing a transfer of control\v501.
  2825.      \vcompleting block statement execution\v904.
  2826.      \vcompleting subprogram execution\v904.
  2827.      \vexpression which is an array aggregate\v409.
  2828.      \vin a function body\v609.
  2829. \uReturned value\n
  2830.      \vof a function call\v509.
  2831.      \vof an instance of a generic formal function\v1204.
  2832.      \vof a main program\v1001.
  2833.      \vof an operation\v308.
  2834.      \vof a predefined operator of an integer type\v314.
  2835.      \vof a predefined operator of a real type\v316.
  2836. \vRight label bracket compound delimiter\v202.
  2837. \uRight parenthesis\n
  2838.      \vcharacter\v201.
  2839.      \vdelimiter\v202.
  2840. \uRounding\n
  2841.      \vin a real-to-integer conversion\v419.
  2842.      \vof results of real operations\v418.
  2843. \vRun time check\v1109.
  2844. \u- S -\n
  2845. \vSafe interval\v418.
  2846. \vSafe number (of a real type)\v316.
  2847.      \vlimit to the result of a real operation\v418.
  2848.      \vof a fixed point type\v319.
  2849.      \vof a floating point type\v317.
  2850.      \vresult of universal expression too large\v423.
  2851. \vSAFE_EMAX (predefined attribute)\v318.
  2852. \vSAFE_LARGE (predefined attribute)\v318.
  2853. \vSAFE_SMALL (predefined attribute)\v318.
  2854. \vSatisfy (a constraint)\v305.
  2855.      \va discriminant constraint\v327.
  2856.      \van index constraint\v322.
  2857.      \va range constraint\v310.
  2858. \vScalar type\v305.
  2859.      \vas a generic parameter\v1203.
  2860.      \vformal parameter\v602.
  2861.      \vof a range in a membership test\v413.
  2862.      \voperation\v315.
  2863. \vScheduling\v911.
  2864. \vScope\v802.
  2865.      \vof a use clause\v804.
  2866. \vSecondary unit\v1001.
  2867.      \vcompiled after the corresponding library unit or parent unit\v1006.
  2868.      \vsubject to pragma elaborate\v1008.
  2869. \vSECONDS (predefined function)\v906.
  2870. \vSelect alternative (of a selective wait)\v908.
  2871. \vSelect statement\v907.
  2872.      \vas a compound statement\v501.
  2873.      \vin an abnormal task\v913.
  2874. \vSelected component\v404.
  2875.      \vas a basic operation\v308.
  2876.      \vas a name\v401.
  2877.      \vas the name of an entry or entry family\v905.
  2878.      \vfor selective visibility\v803.
  2879.      \vin a conforming construct\v604.
  2880.      \vstarting with standard\v806.
  2881.      \vusing a block name\v507.
  2882.      \vusing a loop name\v506.
  2883.      \vwhose prefix denotes a package\v803.
  2884.      \vwhose prefix denotes a record object\v803.
  2885.      \vwhose prefix denotes a task object\v803.
  2886. \vSelection of an exception handler\v1104.
  2887. \vSelective wait\v908.
  2888.      \vaccepting a conditional entry call\v909.
  2889.      \vaccepting a timed entry call\v910.
  2890.      \vraising program_error\v1101.
  2891. \vSelector\v404.
  2892. \vSemicolon character\v201.
  2893. \vSemicolon delimiter\v202.
  2894.      \vfollowed by a pragma\v210.
  2895. \vSEND_CONTROL (low_level_io procedure)\v1421.
  2896. \vSeparate compilation\v1000.
  2897.      \vof a proper body\v333.
  2898.      \vof a proper body declared in another compilation unit\v1004.
  2899. \vSeparator\v202.
  2900. \vSequence of statements\v501.
  2901.      \vin an accept statement\v905.
  2902.      \vin a basic loop\v506.
  2903.      \vin a block statement\v507.
  2904.      \vin a case statement alternative\v505.
  2905.      \vin a conditional entry call\v909.
  2906.      \vin an exception handler\v1102.
  2907.      \vin an if statement\v504.
  2908.      \vin a package body\v701.
  2909.      \vin a  selective wait statement\v908.
  2910.      \vin a subprogram body\v603.
  2911.      \vin a task body\v901.
  2912.      \vin a timed entry call\v910.
  2913.      \vincluding a raise statement\v1103.
  2914.      \vof code statements\v1312.
  2915.      \vraising an exception\v1105.
  2916. \vSequential access file\v1402.
  2917. \vSequential input-output\v1404.
  2918. \vSEQUENTIAL_IO (predefined input-output generic package)\v1402.
  2919.      \vexceptions\v1419.
  2920.      \vspecification\v1405.
  2921. \vSET_COL (text_io procedure)\v1412.
  2922. \vSET_INDEX (input-output procedure) in an instance of direct_io\v1406.
  2923. \vSET_INPUT (text_io procedure)\v1410.
  2924.      \vraising an exception\v1419.
  2925. \vSET_LINE (text_io procedure)\v1412.
  2926. \vSET_LINE_LENGTH (text_io procedure)\v1411.
  2927.      \vraising an exception\v1419.
  2928. \vSET_OUTPUT (text_io procedure)\v1410.
  2929.      \vraising an exception\v1419.
  2930. \vSET_PAGE_LENGTH (text_io procedure)\v1411.
  2931.      \vraising an exception\v1419.
  2932. \vSHARED (predefined pragma)\v914.
  2933. \vShared variable (of two tasks)\v914.
  2934. \vSharp character\v201.
  2935.      \vreplacement by colon character\v212.
  2936. \vShort circuit control form\v411.
  2937.      \vas a basic operation\v308.
  2938.      \vin an expression\v410.
  2939. \vSHORT_FLOAT (predefined type)\v317.
  2940. \vSHORT_INTEGER (predefined type)\v314.
  2941. \vSign of a fixed point number\v319.
  2942. \vSign of a floating point number\v317.
  2943. \vSignificant decimal digits\v317.
  2944. \vSimple expression\v410.
  2945.      \vas a choice\v328.
  2946.      \vas a choice in an aggregate\v407.
  2947.      \vas a range bound\v310.
  2948.      \vfor an entry index in an accept statement\v905.
  2949.      \vin an address clause\v1305.
  2950.      \vin a delay statement\v906.
  2951.      \vin a fixed accuracy definition\v319.
  2952.      \vin a floating accuracy definition\v317.
  2953.      \vin a record representation clause\v1304.
  2954.      \vin a relation\v410.
  2955. \vSimple name\v401.
  2956.      \vas a choice\v328.
  2957.      \vas a formal parameter\v606.
  2958.      \vas a label\v501.
  2959.      \vas a name\v401.
  2960.      \vbefore arrow compound delimiter\v803.
  2961.      \vin an accept statement\v905.
  2962.      \vin an address clause\v1305.
  2963.      \vin an attribute designator\v405.
  2964.      \vin a conforming construct\v604.
  2965.      \vin a discriminant association\v327.
  2966.      \vin an enumeration representation clause\v1303.
  2967.      \vin a package body\v701.
  2968.      \vin a selector\v404.
  2969.      \vin a suppress pragma\v1109.
  2970.      \vin a task body\v901.
  2971.      \vin a variant part\v328.
  2972.      \vin a with clause\v1002.
  2973.      \vversus identifier\v301.
  2974. \vSimple statement\v501.
  2975. \uSIZE (input-output function)\n
  2976.      \vin an instance of direct_io\v1406.
  2977. \vSIZE (predefined attribute)\v1310.
  2978.      \vspecified by a length clause\v1302.
  2979. \vSKIP_LINE (text_io procedure)\v1412.
  2980.      \vraising an exception\v1419.
  2981. \vSKIP_PAGE (text_io procedure)\v1412.
  2982.      \vraising an exception\v1419.
  2983. \vSlice\v403.
  2984.      \vas a basic operation\v308.
  2985.      \vas a name\v401.
  2986.      \vas destination of an assignment\v503.
  2987.      \vof a constant\v303.
  2988.      \vof a derived type\v309.
  2989.      \vof an object as an object\v302.
  2990.      \vof a value of a generic formal array type\v1203.
  2991.      \vof a variable\v303.
  2992.      \vstarting with a prefix\v401.
  2993. \vSMALL (predefined attribute)\v318.
  2994.      \vspecified by a length clause\v1302.
  2995. \vSmall of a fixed point number\v319.
  2996. \vSpace character\v201.
  2997.      \vas a separator\v202.
  2998.      \vin a comment\v209.
  2999.      \vnot allowed in an identifier\v203.
  3000.      \vnot allowed in a numeric literal\v205.
  3001. \vSpace character literal\v207.
  3002. \vSpecial character\v201.
  3003.      \vin a delimiter\v202.
  3004. \vSTANDARD (predefined package)\v806.
  3005.      \vas a declarative region\v801.
  3006.      \venclosing the library units of a program\v1002.
  3007.      \vincluding implicit declarations of fixed point\v416.
  3008.         \vcross-multiplication and cross-division\v416.
  3009. \vSTANDARD_INPUT (text_io function)\v1410.
  3010. \vSTANDARD_OUTPUT (text_io function)\v1410.
  3011. \uStar\n
  3012.      \vcharacter\v201.
  3013.      \vdelimiter\v202.
  3014. \vStatement\v501.
  3015.      \vallowed in an exception handler\v1102.
  3016.      \vas an overload resolution context\v807.
  3017.      \voptimized\v1009.
  3018.      \vraising an exception\v1105.
  3019.      \vthat cannot be reached\v1009.
  3020. \vStatic constraint\v422.
  3021.      \von a subcomponent subject to a component clause\v1304.
  3022.      \von a type\v314.
  3023. \vStatic discrete range\v422.
  3024.      \vas a choice of an aggregate\v409.
  3025.      \vas a choice of a case statement\v505.
  3026.      \vas a choice of a variant part\v328.
  3027. \vStatic expression\v422.
  3028.      \vas a bound in an integer type definition\v314.
  3029.      \vas a choice in a case statement\v505.
  3030.      \vas a choice of a variant part\v328.
  3031.      \vfor a choice in a record aggregate\v409.
  3032.      \vfor a discriminant in a record aggregate\v408.
  3033.      \vin an attribute designator\v405.
  3034.      \vin an enumeration representation clause\v1303.
  3035.      \vin a fixed accuracy definition\v319.
  3036.      \vin a floating accuracy definition\v317.
  3037.      \vin a generic unit\v1201.
  3038.      \vin a length clause\v1302.
  3039.      \vin a number declaration\v302.
  3040.      \vin a record representation clause\v1304.
  3041.      \vin priority pragma\v911.
  3042.      \vwhose type is a universal type\v423.
  3043. \vStatic others choice\v409.
  3044. \vStatic subtype\v422.
  3045.      \vof a discriminant\v328.
  3046.      \vof the expression in a case statement\v505.
  3047. \vSTATUS_ERROR (input-output exception)\v1419.
  3048. \vStorage address of a component\v1304.
  3049. \uStorage bits\n
  3050.      \vallocated to an object or type\v1302.
  3051.      \vof a record component relative to a storage unit\v1304.
  3052.      \vsize of a storage unit\v1308.
  3053. \vStorage reclamation\v421.
  3054. \vStorage representation of a record\v1304.
  3055. \vStorage unit\v1308.
  3056.      \voffset to the start of a record component\v1304.
  3057.      \vsize of a storage unit in bits\v1308.
  3058. \uStorage units allocated\n
  3059.      \vto a collection\v1302.
  3060.      \vto a task activation\v1302.
  3061. \vSTORAGE_ERROR (predefined exception)\v1101.
  3062.      \vraised by an allocator exceeding the allocated storage\v421.
  3063.      \vraised by an elaboration of a declarative item\v1101.
  3064.      \vraised by a task activation exceeding the allocated storage\v1101.
  3065.      \vraised by the execution of a subprogram call\v1101.
  3066. \vSTORAGE_SIZE (predefined attribute)\v1310.
  3067.      \vfor an access type\v332.
  3068.      \vfor a task object or task type\v912.
  3069.      \vspecified by a length clause\v1302.
  3070. \vSTORAGE_UNIT (predefined pragma)\v1308.
  3071. \vSTRING (predefined type)\v324.
  3072.      \vas the parameter of value attribute\v315.
  3073.      \vas the result of image attribute\v315.
  3074. \vString bracket\v208.
  3075. \vString literal\v208.
  3076.      \vas a basic operation\v308.
  3077.      \vas an operator symbol\v601.
  3078.      \vas a primary\v410.
  3079.      \vmay not be the argument of a conversion\v419.
  3080.      \vreplaced by a catenation of basic characters\v212.
  3081. \vSubaggregate\v409.
  3082. \vSubcomponent\v305.
  3083.      \vdepending on a discriminant\v326.
  3084.      \vof a component for which a component clause is given\v1304.
  3085.      \vrenamed\v805.
  3086.      \vthat is a task object\v902.
  3087.      \vwhose type is a limited type\v708.
  3088.      \vwhose type is a private type\v705.
  3089. \vSubprogram\v600.
  3090.      \vas a generic instance\v1206.
  3091.      \vas a main program\v1001.
  3092.      \vas an operation\v308.
  3093.      \vincluding a raise statement\v1103.
  3094.      \vof a derived type\v309.
  3095.      \voverloaded\v610.
  3096.      \vrenamed\v805.
  3097.      \vsubject to an address clause\v1305.
  3098.      \vsubject to an inline pragma\v605.
  3099.      \vsubject to an interface pragma\v1313.
  3100.      \vsubject to a representation clause\v1301.
  3101.      \vsubject to a suppress pragma\v1109.
  3102.      \vwith a separately compiled body\v1002.
  3103. \vSubprogram body\v603.
  3104.      \vas a generic body\v1205.
  3105.      \vas a library unit\v1001.
  3106.      \vas a proper body\v333.
  3107.      \vas a secondary unit\v1001.
  3108.      \vas a secondary unit compiled after the corresponding library unit\v1006.
  3109.      \vhaving dependent tasks\v904.
  3110.      \vin a package body\v701.
  3111.      \vincluding an exception handler\v1102.
  3112.      \vincluding an exit statement\v508.
  3113.      \vincluding a goto statement\v510.
  3114.      \vincluding an implicit declaration\v501.
  3115.      \vincluding a return statement\v508.
  3116.      \vincluding code statements must be a procedure body\v1312.
  3117.      \vinlined in place of each call\v605.
  3118.      \vmust be in the same declarative part as the declaration\v333.
  3119.      \vnot allowed for a subprogram subject to an interface pragma\v1313.
  3120.      \vnot yet elaborated at a call\v333.
  3121.      \vraising an exception\v1105.
  3122.      \vrecompiled\v1006.
  3123. \vSubprogram call\v606.
  3124.      \vbefore elaboration of the body\v333.
  3125.      \vstatement replaced by an inlining of the body\v605.
  3126.      \vstatement with a default actual parameter\v608.
  3127.      \vto a derived subprogram\v309.
  3128.      \vto a generic instance\v1200.
  3129. \vSubprogram declaration\v601.
  3130.      \vand body as a declarative region\v801.
  3131.      \vas a basic declaration\v301.
  3132.      \vas a later declarative item\v333.
  3133.      \vas a library unit\v1001.
  3134.      \vas an overloaded declaration\v803.
  3135.      \vimplied by the body\v603.
  3136.      \vin a package specification\v701.
  3137.      \vmade directly visible by a use clause\v804.
  3138.      \vof an operator\v611.
  3139.      \vrecompiled\v1006.
  3140. \vSubprogram specification\v601.
  3141.      \vand  forcing occurrence\v1301.
  3142.      \vconforming to another\v604.
  3143.      \vfor a function\v609.
  3144.      \vin a body stub\v1004.
  3145.      \vin a generic declaration\v1201.
  3146.      \vin a renaming declaration\v805.
  3147.      \vin a subprogram body\v603.
  3148.      \vincluding the name of a private type\v705.
  3149.      \vof a derived subprogram\v309.
  3150. \vSubtraction operation\v414.
  3151.      \vfor a real type\v418.
  3152. \vSubtype\v305.
  3153.      \vdeclared by a numeric type declaration\v314.
  3154.      \vin a membership test\v413.
  3155.      \vnot considered in overload resolution\v807.
  3156.      \vof an access type\v330.
  3157.      \vof an actual parameter\v607.
  3158.      \vof a component of an array\v321.
  3159.      \vof a component of a record\v325.
  3160.      \vof a constant in a static expression\v422.
  3161.      \vof a discriminant of a generic formal type\v1208.
  3162.      \vof a formal parameter\v607.
  3163.      \vof a formal parameter or result of a renamed subprogram or entry\v805.
  3164.      \vof a generic formal type\v1203.
  3165.      \vof an index of a generic formal array type\v1210.
  3166.      \vof a private type\v704.
  3167.      \vof a real type\v317.
  3168.      \vof a scalar type\v310.
  3169.      \vof a task type\v902.
  3170.      \vof a variable\v502.
  3171.      \vsubject to a representation clause\v1301.
  3172. \vSubtype conversion\v419.
  3173.      \vin an array assignment\v503.
  3174.      \vto a real type\v418.
  3175. \vSubtype declaration\v307.
  3176.      \vand forcing occurrences\v1301.
  3177.      \vas a basic declaration\v301.
  3178.      \vincluding the name of a private type\v705.
  3179. \vSubtype indication\v307.
  3180.      \vas a component subtype indication\v325.
  3181.      \vas a discrete range\v321.
  3182.      \vfor a subtype of a generic formal type\v1203.
  3183.      \vin an access type definition\v330.
  3184.      \vin an allocator\v421.
  3185.      \vin an array type definition\v321.
  3186.      \vin a component declaration\v325.
  3187.      \vin a constrained array definition\v321.
  3188.      \vin a derived type definition\v309.
  3189.      \vin a generic formal part\v1201.
  3190.      \vin an object declaration\v302.
  3191.      \vin an unconstrained array definition\v321.
  3192.      \vincluding a fixed point constraint\v319.
  3193.      \vincluding a floating point constraint\v317.
  3194.      \vwith a range constraint\v310.
  3195. \vSubunit\v1004.
  3196.      \vas a compilation unit\v1007.
  3197.      \vas a library unit\v1007.
  3198.      \vas a secondary unit\v1001.
  3199.      \vcompiled after the corresponding parent unit\v1006.
  3200.      \vnot allowed for a subprogram subject to an interface pragma\v1313.
  3201.      \vof a compilation unit subject to a context clause\v1002.
  3202.      \vraising an exception\v1105.
  3203.      \vrecompiled (does not affect other compilation units)\v1006.
  3204. \vSUCC (predefined attribute)\v315.
  3205. \vSUPPRESS (predefined pragma)\v1109.
  3206. \vSyntactic category\v107.
  3207. \vSyntax notation\v107.
  3208. \vSyntax rule\v107.
  3209. \vSYSTEM (predefined library package)\v1308.
  3210. \vSystem dependent\v2000.
  3211.      \vattribute\v1304.
  3212.      \vconstant\v1308.
  3213.      \vnamed number\v1308.
  3214.      \vrecord component\v1304.
  3215.      \vtype\v1308.
  3216. \vSYSTEM.ADDRESS (predefined type)\v1308.
  3217. \vSYSTEM.FINE_DELTA (predefined named number)\v1309.
  3218. \vSYSTEM.MAX_DIGITS (predefined named number)\v1309.
  3219.      \vlimit on the significant digits of a floating point type\v317.
  3220. \vSYSTEM.MAX_INT (predefined named number)\v1309.
  3221.      \vexceeded by the value of a universal expression\v423.
  3222. \vSYSTEM.MAX_MANTISSA (predefined named number)\v1309.
  3223. \vSYSTEM.MEMORY_SIZE (predefined named number)\v1308.
  3224. \vSYSTEM.MIN_INT (predefined named number)\v1309.
  3225.      \vgreater than the value of a universal expression\v423.
  3226. \vSYSTEM.NAME (predefined type)\v1308.
  3227. \vSYSTEM.STORAGE_UNIT (predefined named number)\v1308.
  3228. \vSYSTEM.SYSTEM_NAME (predefined constant)\v1308.
  3229. \vSYSTEM.TICK (predefined named number)\v1309.
  3230. \vSYSTEM_NAME (predefined pragma)\v1308.
  3231. \u- T -\n
  3232. \uTabulation\n
  3233.      \vhorizontal\v201.
  3234.      \vvertical\v201.
  3235. \vTarget statement (of a goto statement)\v510.
  3236. \vTarget type of a conversion\v419.
  3237. \vTask\v900.
  3238.      \vcalling the main program\v1001.
  3239.      \vraising an exception\v1107.
  3240.      \vscheduling\v911.
  3241.      \vsuspension awaiting a rendezvous\v905.
  3242.      \vsuspension by a selective wait\v908.
  3243.      \vsuspension of an abnormal task\v913.
  3244. \vTask activation\v903.
  3245.      \vbefore elaboration of the body\v333.
  3246.      \vcausing synchronization\v913.
  3247.      \vnot started for an abnormal task\v913.
  3248.      \vof a task with no task body\v1101.
  3249. \vTask body\v901.
  3250.      \vas a proper body\v333.
  3251.      \vin a package body\v701.
  3252.      \vincluding an exception handler\v1102.
  3253.      \vincluding an exit statement\v508.
  3254.      \vincluding a goto statement\v510.
  3255.      \vincluding an implicit declaration\v501.
  3256.      \vmust be in the same declarative part as the declaration\v333.
  3257.      \vnot yet elaborated at an activation\v333.
  3258.      \vraising an exception\v1105.
  3259.      \vspecifying the execution of a task\v902.
  3260. \vTask declaration\v901.
  3261.      \vand body as a declarative region\v801.
  3262.      \vas a basic declaration\v301.
  3263.      \vas a later declarative item\v333.
  3264.      \velaboration raising an exception\v1106.
  3265.      \vin a package specification\v701.
  3266. \uTask designated\n
  3267.      \vby a formal parameter\v602.
  3268.      \vby a value of a task type\v901.
  3269. \vTask execution\v903.
  3270. \vTask object\v902.
  3271.      \vdesignated by an access value\v902.
  3272.      \vdetermining task dependence\v904.
  3273.      \vrenamed\v805.
  3274. \vTask priority\v911.
  3275.      \vof a task with an interrupt entry\v1306.
  3276. \vTask specification\v901.
  3277.      \vincluding an entry declaration\v905.
  3278.      \vincluding a priority pragma\v911.
  3279.      \vincluding a representation clause\v1301.
  3280. \vTask synchronization\v905.
  3281. \vTask type\v901.
  3282.      \vcompleting an incomplete type definition\v331.
  3283.      \vformal parameter\v602.
  3284.      \vobject initialization\v303.
  3285.      \vvalue designating a task object\v303.
  3286. \vTask unit\v901.
  3287.      \vdeclaration determining the visibility of another declaration\v803.
  3288.      \vincluding a raise statement\v1103.
  3289.      \vsubject to an address clause\v1305.
  3290.      \vsubject to a representation clause\v1301.
  3291.      \vsubject to a suppress pragma\v1109.
  3292.      \vwith a separately compiled body\v1004.
  3293. \vTASKING_ERROR (predefined exception)\v1101.
  3294.      \vraised by an entry call to an abnormal task\v913.
  3295.      \vraised by an entry call to a completed task\v905.
  3296.      \vraised by an exception in the task body\v1106.
  3297.      \vraised by failure of an activation\v903.
  3298. \vTerm\v410.
  3299.      \vin a simple expression\v410.
  3300. \vTerminate alternative (of a selective wait)\v908.
  3301.      \vcausing a transfer of control\v501.
  3302.      \vin a select statement causing a loop to be exited\v506.
  3303.      \vselection\v904.
  3304.      \vselection in the presence of an accept alternative for\v1306.
  3305.         \van interrupt entry\v1306.
  3306. \vTERMINATED (predefined attribute) for a task object\v912.
  3307. \vTerminated task\v904.
  3308.      \vnot becoming abnormal\v913.
  3309.      \vobject designated by an access value\v421.
  3310.      \vtermination of a task during its activation\v903.
  3311. \vText input-output\v1408.
  3312. \vText of a program\v202.
  3313. \vTEXT_IO (predefined input-output package)\v1408.
  3314.      \vexceptions\v1419.
  3315.      \vspecification\v1418.
  3316. \vTIME (predefined type)\v906.
  3317. \vTIME_OF (predefined function)\v906.
  3318. \vTimed entry call\v910.
  3319.      \vand renamed entries\v805.
  3320.      \vsubject to an address clause\v1306.
  3321. \vTRUE boolean enumeration literal\v313.
  3322. \vType\v305.
  3323.      \vname\v306.
  3324.      \vof an actual parameter\v607.
  3325.      \vof an aggregate\v408.
  3326.      \vof an array component of a generic formal array type\v1210.
  3327.      \vof an array index of a generic formal array type\v1210.
  3328.      \vof a case statement expression\v505.
  3329.      \vof a condition\v504.
  3330.      \vof a declared object\v302.
  3331.      \vof a discriminant of a generic formal private type\v1208.
  3332.      \vof an expression\v410.
  3333.      \vof a file\v1401.
  3334.      \vof a formal parameter of a generic formal subprogram\v1204.
  3335.      \vof a generic actual object\v1207.
  3336.      \vof a generic formal object\v1202.
  3337.      \vof an index\v402.
  3338.      \vof a loop parameter\v506.
  3339.      \vof a named number\v302.
  3340.      \vof an object designated by a generic formal access types\v1211.
  3341.      \vof a primary in an expression\v410.
  3342.      \vof a shared variable\v914.
  3343.      \vof a slice\v403.
  3344.      \vof a task object\v902.
  3345.      \vof a universal expression\v423.
  3346.      \vof a value\v305.
  3347.      \vof discriminants of a generic formal object and the matching\v1208.
  3348.         \vactual object\v1208.
  3349.      \vof the literal null\v406.
  3350.      \vof the result of a generic formal function\v1204.
  3351.      \vrenamed\v805.
  3352.      \vsubject to a representation clause\v1301.
  3353.      \vsubject to a suppress pragma\v1109.
  3354.      \vyielded by an attribute\v405.
  3355. \vType conversion\v419.
  3356.      \vas an actual parameter\v606.
  3357.      \vas a primary\v410.
  3358.      \vin a static expression\v422.
  3359.      \vto a real type\v418.
  3360. \vType declaration\v306.
  3361.      \vas a basic declaration\v301.
  3362.      \vas a full declaration\v705.
  3363.      \vimplicitly declaring operations\v308.
  3364.      \vin a package specification\v701.
  3365.      \vincluding the name of a private type\v705.
  3366.      \vof a fixed point type\v319.
  3367.      \vof a floating point type\v317.
  3368.      \vof an integer type\v314.
  3369.      \vof a subtype\v1301.
  3370. \vType definition\v306.
  3371. \vType mark (denoting a type or subtype)\v307.
  3372.      \vas a generic actual parameter\v1206.
  3373.      \vin an allocator\v421.
  3374.      \vin a code statement\v1312.
  3375.      \vin a conversion\v419.
  3376.      \vin a deferred constant declaration\v704.
  3377.      \vin a discriminant specification\v326.
  3378.      \vin a generic formal part\v1201.
  3379.      \vin a generic parameter declaration\v1207.
  3380.      \vin an index subtype definition\v321.
  3381.      \vin a parameter specification\v601.
  3382.      \vin a qualified expression\v420.
  3383.      \vin a relation\v410.
  3384.      \vin a renaming declaration\v805.
  3385.      \vin a subprogram specification\v601.
  3386.      \vof a formal parameter of a generic formal subprogram\v1204.
  3387.      \vof a generic formal array type\v1203.
  3388.      \vof a static scalar subtype\v422.
  3389.      \vof the result of a generic formal function\v1204.
  3390. \vType with discriminants\v305.
  3391.      \vas an actual to a formal private type\v1208.
  3392.      \vas the component type of an array that is the operand\v419.
  3393.         \vof a conversion\v419.
  3394. \u- U -\n
  3395. \vUnary adding operator\v410.
  3396.      \vas an operation of a discrete type\v315.
  3397.      \vin a simple expression\v410.
  3398.      \voverloaded\v611.
  3399. \vUnary operator\v411.
  3400.         \vas an operation of a fixed point type\v311.
  3401. \vUNCHECKED_CONVERSION (predefined generic library function)\v1316.
  3402. \vUNCHECKED_DEALLOCATION (predefined generic library procedure)\v1315.
  3403. \vUnconstrained array definition\v321.
  3404. \vUnconstrained array type\v321.
  3405.      \vas an actual to a formal private type\v1208.
  3406.      \vformal parameter\v602.
  3407.      \vsubject to a length clause\v1302.
  3408. \vUnconstrained subtype\v305.
  3409.      \vindication in a generic unit\v1208.
  3410. \vUnconstrained type\v305.
  3411.      \vformal parameter\v602.
  3412.      \vwith discriminants\v607.
  3413. \vUnconstrained variable\v305.
  3414. \uUndefined value\n
  3415.      \vof a scalar parameter\v602.
  3416.      \vof a scalar variable\v303.
  3417. \vUnderline character\v201.
  3418.      \vin a based literal\v206.
  3419.      \vin a decimal literal\v205.
  3420.      \vin an identifier\v203.
  3421. \vUnhandled exception\v1105.
  3422. \vUniversal expression\v423.
  3423.      \vassigned\v502.
  3424.      \vin an attribute designator\v405.
  3425.      \vof a real type implicitly converted\v418.
  3426.      \vthat is static\v423.
  3427. \vUniversal type\v423.
  3428.      \vof a named number\v304.
  3429. \vUNIVERSAL_FIXED (predefined type)\v319.
  3430.      \vresult of fixed point multiplying operators\v416.
  3431. \vUNIVERSAL_INTEGER (predefined type)\v314.
  3432.      \vargument to a conversion\v308.
  3433.      \vattribute\v315.
  3434.      \vbounds of a discrete range\v322.
  3435.      \vbounds of a loop parameter\v506.
  3436.      \vcodes representing enumeration type values\v1303.
  3437.      \vconverted to an integer type\v315.
  3438.      \vof integer literals\v204.
  3439.      \vresult of an operation\v423.
  3440. \vUNIVERSAL_REAL (predefined type)\v316.
  3441.      \vargument to a conversion\v308.
  3442.      \vattribute\v1309.
  3443.      \vconverted to a fixed point type\v320.
  3444.      \vconverted to a floating point type\v318.
  3445.      \vof real literals\v204.
  3446.      \vresult of an operation\v423.
  3447. \vUpdating the value of an object\v602.
  3448. \vUpper case letter\v201.
  3449.      \vA to F in a based literal\v206.
  3450.      \vE in a decimal literal\v205.
  3451.      \vin an identifier\v203.
  3452. \vUse clause (to achieve direct visibility)\v804.
  3453.      \vas a basic declarative item\v333.
  3454.      \vas a later declarative item\v333.
  3455.      \vin a code procedure body\v1312.
  3456.      \vin a context clause of a compilation unit\v1002.
  3457.      \vin a context clause of a subunit\v1004.
  3458.      \vinserted by the environment\v1007.
  3459. \vUSE_ERROR (input-output exception)\v1419.
  3460. \u- V -\n
  3461. \vVAL (predefined attribute)\v315.
  3462. \uValue\n
  3463.      \vin a constant\v303.
  3464.      \vin a task object\v902.
  3465.      \vin a variable\v303.
  3466.      \vof an array type\v321.
  3467.      \vof a based literal\v206.
  3468.      \vof a boolean type\v313.
  3469.      \vof a character literal\v207.
  3470.      \vof a character type\v312.
  3471.      \vof a decimal literal\v205.
  3472.      \vof a fixed point type\v319.
  3473.      \vof a floating point type\v317.
  3474.      \vof a record type\v325.
  3475.      \vof a record type with discriminants\v326.
  3476.      \vof a string literal\v208.
  3477.      \vof a string type\v324.
  3478. \vVALUE (predefined attribute)\v315.
  3479. \vVariable\v303.
  3480.      \vas an actual parameter\v602.
  3481.      \vdeclared in a package body\v703.
  3482.      \vformal parameter\v602.
  3483.      \vin an assignment statement\v502.
  3484.      \vof an array type as destination of an assignment\v503.
  3485.      \vof a private type\v705.
  3486.      \vrenamed\v805.
  3487.      \vthat is a slice\v403.
  3488. \vVariable declaration\v303.
  3489. \vVariant\v328.
  3490.      \vin a variant part\v328.
  3491. \vVariant part\v328.
  3492.      \vin a component list\v325.
  3493.      \vin a record aggregate\v408.
  3494. \vVertical bar character\v201.
  3495.      \vreplacement by exclamation character\v212.
  3496. \vVertical bar delimiter\v202.
  3497. \vVertical tabulation format effector\v201.
  3498. \vVisibility\v803.
  3499.      \vand renaming\v805.
  3500.      \vdetermining multiple meanings of an identifier\v804.
  3501.      \vdetermining order of compilation\v1006.
  3502.      \vdue to a use clause\v804.
  3503.      \vof a basic operation\v803.
  3504.      \vof a character literal\v803.
  3505.      \vof a default for a generic formal subprogram\v1212.
  3506.      \vof a generic formal parameter\v1206.
  3507.      \vof a library unit due to a with clause\v806.
  3508.      \vof a name of an exception\v1102.
  3509.      \vof an operation declared in a package\v706.
  3510.      \vof an operator symbol\v803.
  3511.      \vof a renaming declaration\v805.
  3512.      \vof a subprogram declared in a package\v603.
  3513.      \vof declarations in a package body\v703.
  3514.      \vof declarations in a package specification\v702.
  3515.      \vof declarations in the package system\v1308.
  3516.      \vwithin a subunit\v1004.
  3517. \vVisibility by selection\v803.
  3518. \vVisible part (of a package)\v702.
  3519.      \vexpanded name denoting a declaration in a visible part\v802.
  3520.      \vuse clause naming the package\v804.
  3521.      \vvisibility of a declaration in a visible part\v803.
  3522. \u- W -\n
  3523. \uWait\n
  3524.   \vselective wait\v908.
  3525. \vWIDTH (predefined attribute)\v315.
  3526. \vWith clause\v1002.
  3527.      \vdetermining order of compilation\v1006.
  3528.      \vdetermining the implicit order of library units\v806.
  3529.      \vin a context clause of a compilation unit\v1002.
  3530.      \vin a context clause of a subunit\v1004.
  3531.      \vinserted by the environment\v1007.
  3532.      \vleading to direct visibility\v803.
  3533. \uWRITE (input-output procedure)\n
  3534.      \vin an instance of direct_io\v1406.
  3535.      \vin an instance of sequential_io\v1404.
  3536. \vWriting an output file\v1401.
  3537. \u- X -\n
  3538. \uXor operator\n
  3539.      \vlogical operator\v411.
  3540. \u- Y -\n
  3541. \vYEAR (predefined function)\v906.
  3542. 1.       \uIntroduction\n
  3543. Ada  is  a  programming  language  designed in accordance with requirements
  3544. defined by the United States Department of Defense:  the so-called Steelman
  3545. requirements.   Overall,  these  requirements  call  for  a  language  with
  3546. considerable  expressive  power  covering  a wide application domain.  As a
  3547. result, the language includes facilities  offered  by  classical  languages
  3548. such  as  Pascal  as  well  as  facilities  often found only in specialized
  3549. languages.  Thus the language is a modern  algorithmic  language  with  the
  3550. usual  control  structures,  and  with  the  ability  to  define  types and
  3551. subprograms.  It also serves the need for modularity, whereby data,  types,
  3552. and  subprograms  can  be  packaged.   It treats modularity in the physical
  3553. sense as well, with a facility to support separate compilation.
  3554. In addition to these aspects, the language  covers  real-time  programming,
  3555. with  facilities to model parallel tasks and to handle exceptions.  It also
  3556. covers  systems  programming;   this  requires  precise  control  over  the
  3557. representation of data and access to system-dependent properties.  Finally,
  3558. both application-level and machine-level input-output are defined.
  3559. More details:
  3560.  1.1    \vScope of the Standard\v101.
  3561.  1.2    \vStructure of the Standard\v104.
  3562.  1.3    \vDesign Goals and Sources\v105.
  3563.  1.4    \vLanguage Summary\v106.
  3564.  1.5    \vSyntax Notation\v107.
  3565.  1.6    \vClassification of Errors\v108.
  3566. 1.1      \uScope of the Standard\n
  3567. This  standard  specifies  the form and meaning of program units written in
  3568. Ada.  Its purpose is to promote  the  portability  of  Ada  programs  to  a
  3569. variety of data processing systems.
  3570. More details:
  3571. 1.1.1  \vExtent of the Standard\v102.
  3572. 1.1.2  \vConformity of an Implementation with the Standard\v103.
  3573. 1.1.1    \uExtent of the Standard\n
  3574. This standard specifies:
  3575. (a)  The form of a program unit written in Ada.
  3576. (b)  The effect of translating and executing such a program unit.
  3577. (c)  The manner in  which  program  units  may  be  combined  to  form  Ada
  3578.      programs.
  3579. (d)  The predefined program units that  a  conforming  implementation  must
  3580.      supply.
  3581. (e)  The permissible variations within the  standard,  and  the  manner  in
  3582.      which they must be specified.
  3583. (f)  Those violations of the standard that a conforming  implementation  is
  3584.      required  to  detect,  and  the  effect  of attempting to translate or
  3585.      execute a program unit containing such violations.
  3586. (g)  Those violations of the standard that a conforming  implementation  is
  3587.      not required to detect.
  3588. This standard does not specify:
  3589. (h)  The means whereby a program unit written in Ada  is  transformed  into
  3590.      object code executable by a processor.
  3591. (i)  The means whereby translation or execution of program units is invoked
  3592.      and the executing units are controlled.
  3593. (j)  The size or speed of the object code, or the relative execution  speed
  3594.      of different language constructs.
  3595. (k)  The form or contents of any listings produced by implementations;   in
  3596.      particular, the form or contents of error or warning messages.
  3597. (l)  The effect of executing a program unit  that  contains  any  violation
  3598.      that a conforming implementation is not required to detect.
  3599. (m)  The size of a program or program unit that will exceed the capacity of
  3600.      a particular conforming implementation.
  3601. Where  this  standard  specifies  that a program unit written in Ada has an
  3602. exact effect, this effect is the operational meaning of  the  program  unit
  3603. and  must  be  produced  by  all  conforming  implementations.   Where this
  3604. standard specifies permissible variations in the effects of constituents of
  3605. a program unit written in Ada, the operational meaning of the program  unit
  3606. as  a  whole  is understood to be the range of possible effects that result
  3607. from all these variations, and a conforming implementation  is  allowed  to
  3608. produce  any of these possible effects.  Examples of permissible variations
  3609.   -  The represented values of fixed or floating  numeric  quantities,  and
  3610.      the results of operations upon them.
  3611.   -  The order of execution of statements in different parallel  tasks,  in
  3612.      the absence of explicit synchronization.
  3613. 1.1.2    \uConformity of an Implementation With the Standard\n
  3614. A conforming implementation is one that:
  3615. (a)  Correctly translates and executes legal program units written in  Ada,
  3616.      provided  that  they are not so large as to exceed the capacity of the
  3617.      implementation.
  3618. (b)  Rejects all program units that are so large as to exceed the  capacity
  3619.      of the implementation.
  3620. (c)  Rejects all program units  that  contain  errors  whose  detection  is
  3621.      required by the standard.
  3622. (d)  Supplies all predefined program units required by the standard.
  3623. (e)  Contains no variations except where the standard permits.
  3624. (f)  Specifies all such permitted variations in the  manner  prescribed  by
  3625.      the standard.
  3626. 1.2      \uStructure of the Standard\n
  3627. This  reference  manual  contains  fourteen  chapters, three annexes, three
  3628. appendices, and an index.
  3629. Each chapter is divided into sections that have a common  structure.   Each
  3630. section  introduces  its  subject,  gives  any  necessary syntax rules, and
  3631. describes the semantics of the corresponding language constructs.  Examples
  3632. and notes, and then references, may appear at the end of a section.
  3633. Examples are meant to illustrate  the  possible  forms  of  the  constructs
  3634. described.   Notes  are  meant  to  emphasize  consequences  of  the  rules
  3635. described in the section or elsewhere.  References are meant to attract the
  3636. attention of readers to a term or phrase having a technical meaning defined
  3637. in another section.
  3638. The standard definition of the Ada programming  language  consists  of  the
  3639. fourteen   chapters  and  the  three  annexes,  subject  to  the  following
  3640. restriction:   the  material  in  each  of  the  items  listed   below   is
  3641. informative, and not part of the standard definition of the Ada programming
  3642. language:
  3643.   -  Section 1.3 \vDesign goals and sources\v105.
  3644.   -  Section 1.4 \vLanguage summary\v106.
  3645.   -  The examples, notes, and references given at the end of each section
  3646.   -  Each section whose title starts with the word "Example" or  "Examples"
  3647. 1.3      \uDesign Goals and Sources\n
  3648. Ada  was  designed with three overriding concerns:  program reliability and
  3649. maintenance, programming as a human activity, and efficiency.
  3650. The need for languages that promote reliability and simplify maintenance is
  3651. well established.  Hence emphasis was placed on  program  readability  over
  3652. ease  of  writing.   For  example,  the  rules of the language require that
  3653. program variables be explicitly declared and that their type be  specified.
  3654. Since  the  type  of  a  variable  is  invariant, compilers can ensure that
  3655. operations on variables are compatible with  the  properties  intended  for
  3656. objects of the type.  Furthermore, error-prone notations have been avoided,
  3657. and  the syntax of the language avoids the use of encoded forms in favor of
  3658. more English-like constructs.  Finally, the  language  offers  support  for
  3659. separate  compilation  of  program  units in a way that facilitates program
  3660. development and maintenance, and which provides the same degree of checking
  3661. between units as within a unit.
  3662. Concern for the human programmer  was  also  stressed  during  the  design.
  3663. Above  all,  an attempt was made to keep the language as small as possible,
  3664. given the ambitious nature of the application domain.  We have attempted to
  3665. cover this domain with a small number of underlying concepts integrated  in
  3666. a  consistent  and systematic way.  Nevertheless we have tried to avoid the
  3667. pitfalls of excessive involution, and in the constant  search  for  simpler
  3668. designs  we  have  tried  to  provide  language  constructs that correspond
  3669. intuitively to what the users will normally expect.
  3670. Like many other human activities, the development of programs  is  becoming
  3671. ever  more  decentralized  and  distributed.   Consequently, the ability to
  3672. assemble a program from independently produced software components has been
  3673. a central idea in this design.  The concepts of packages, of private types,
  3674. and of  generic  units  are  directly  related  to  this  idea,  which  has
  3675. ramifications in many other aspects of the language.
  3676. No  language  can  avoid the problem of efficiency.  Languages that require
  3677. over-elaborate compilers, or that lead to the inefficient use of storage or
  3678. execution time, force these inefficiencies  on  all  machines  and  on  all
  3679. programs.   Every  construct  of  the language was examined in the light of
  3680. present  implementation   techniques.    Any   proposed   construct   whose
  3681. implementation was unclear or that required excessive machine resources was
  3682. rejected.
  3683. None of the above design goals was considered as achievable after the fact.
  3684. The design goals drove the entire design process from the beginning.
  3685. A  perpetual  difficulty  in language design is that one must both identify
  3686. the capabilities required by the application  domain  and  design  language
  3687. features  that  provide these capabilities.  The difficulty existed in this
  3688. design, although to a lesser degree than  usual  because  of  the  Steelman
  3689. requirements.   These  requirements  often simplified the design process by
  3690. allowing it to concentrate on the design of a given system providing a well
  3691. defined  set  of  capabilities,  rather  than  on  the  definition  of  the
  3692. capabilities themselves.
  3693. Another significant simplification of the design work resulted from earlier
  3694. experience acquired by several successful Pascal derivatives developed with
  3695. similar goals.  These are the languages Euclid, Lis, Mesa, Modula, and Sue.
  3696. Many of the key ideas and syntactic forms developed in these languages have
  3697. counterparts  in  Ada.   Several  existing  languages  such as Algol 68 and
  3698. Simula, and also  recent  research  languages  such  as  Alphard  and  Clu,
  3699. influenced  this  language in several respects, although to a lesser degree
  3700. than did the Pascal family.
  3701. Finally, the evaluation reports received on  an  earlier  formulation  (the
  3702. Green  language),  and  on alternative proposals (the Red, Blue, and Yellow
  3703. languages), the language reviews that took place  at  different  stages  of
  3704. this project, and the thousands of comments received from fifteen different
  3705. countries  during  the  preliminary stages of the Ada design and during the
  3706. ANSI canvass, all had a significant impact on the  standard  definition  of
  3707. the language.
  3708. 1.4      \uLanguage Summary\n
  3709. An  Ada  program  is  composed of one or more program units.  These program
  3710. units can be compiled separately.  Program units may be subprograms  (which
  3711. define  executable  algorithms), package units (which define collections of
  3712. entities), task units (which  define  parallel  computations),  or  generic
  3713. units  (which  define  parameterized  forms  of  packages and subprograms).
  3714. Each unit normally consists of two parts:  a specification, containing  the
  3715. information that must be visible to other units, and a body, containing the
  3716. implementation details, which need not be visible to other units.
  3717. This  distinction of the specification and body, and the ability to compile
  3718. units separately, allows a program to be designed, written, and tested as a
  3719. set of largely independent software components.
  3720. An Ada program will normally make use of a  library  of  program  units  of
  3721. general   utility.    The   language   provides  means  whereby  individual
  3722. organizations can construct their own libraries.  The text of a  separately
  3723. compiled program unit must name the library units it requires.
  3724. \uProgram Units\n
  3725. A  subprogram is the basic unit for expressing an algorithm.  There are two
  3726. kinds of subprograms:  procedures and functions.  A procedure is the  means
  3727. of  invoking  a  series  of actions.  For example, it may read data, update
  3728. variables, or produce some output.  It may have parameters,  to  provide  a
  3729. controlled means of passing information between the procedure and the point
  3730. of call.
  3731. A  function  is  the  means  of invoking the computation of a value.  It is
  3732. similar to a procedure, but in addition will return a result.
  3733. A package is the basic unit for defining a collection of logically  related
  3734. entities.   For  example,  a package can be used to define a common pool of
  3735. data and types, a collection of related  subprograms,  or  a  set  of  type
  3736. declarations  and  associated  operations.   Portions  of  a package can be
  3737. hidden from the user, thus allowing access only to the  logical  properties
  3738. expressed by the package specification.
  3739. A task unit is the basic unit for defining a task whose sequence of actions
  3740. may  be  executed in parallel with those of other tasks.  Such tasks may be
  3741. implemented  on  multicomputers,  multiprocessors,  or   with   interleaved
  3742. execution  on  a  single processor.  A task unit may define either a single
  3743. executing task or a task type permitting the  creation  of  any  number  of
  3744. similar tasks.
  3745. \uDeclarations and Statements\n
  3746. The  body  of  a  program unit generally contains two parts:  a declarative
  3747. part, which defines the logical entities to be used in  the  program  unit,
  3748. and  a  sequence  of statements, which defines the execution of the program
  3749. unit.
  3750. The declarative part associates names with declared entities.  For example,
  3751. a name may denote a type, a constant,  a  variable,  or  an  exception.   A
  3752. declarative  part  also introduces the names and parameters of other nested
  3753. subprograms, packages, task units, and generic units  to  be  used  in  the
  3754. program unit.
  3755. The  sequence  of statements describes a sequence of actions that are to be
  3756. performed.  The statements are executed  in  succession  (unless  an  exit,
  3757. return, or goto statement, or the raising of an exception, causes execution
  3758. to continue from another place).
  3759. An  assignment statement changes the value of a variable.  A procedure call
  3760. invokes execution of a procedure after associating  any  actual  parameters
  3761. provided at the call with the corresponding formal parameters.
  3762. Case  statements  and  if  statements  allow  the  selection of an enclosed
  3763. sequence of statements based on the value of an expression or on the  value
  3764. of a condition.
  3765. The  loop statement provides the basic iterative mechanism in the language.
  3766. A loop statement specifies that a sequence of statements is to be  executed
  3767. repeatedly  as  directed by an iteration scheme, or until an exit statement
  3768. is encountered.
  3769. A block statement comprises  a  sequence  of  statements  preceded  by  the
  3770. declaration of local entities used by the statements.
  3771. Certain  statements are only applicable to tasks.  A delay statement delays
  3772. the execution of a task for a specified duration.  An entry call  statement
  3773. is  written  as  a  procedure  call  statement;  it specifies that the task
  3774. issuing the call is ready for a rendezvous with another task that has  this
  3775. entry.   The  called  task  is  ready  to  accept  the  entry call when its
  3776. execution reaches a corresponding accept  statement,  which  specifies  the
  3777. actions then to be performed.  After completion of the rendezvous, both the
  3778. calling  task and the task having the entry may continue their execution in
  3779. parallel.  One form of the select statement allows a selective wait for one
  3780. of several alternative rendezvous.  Other forms  of  the  select  statement
  3781. allow conditional or timed entry calls.
  3782. Execution  of a program unit may encounter error situations in which normal
  3783. program execution cannot continue.  For example, an arithmetic  computation
  3784. may exceed the maximum allowed value of a number, or an attempt may be made
  3785. to  access  an  array component by using an incorrect index value.  To deal
  3786. with such error situations,  the  statements  of  a  program  unit  can  be
  3787. textually  followed  by  exception  handlers that specify the actions to be
  3788. taken when the error situation arises.  Exceptions can be raised explicitly
  3789. by a raise statement.
  3790. \uData Types\n
  3791. Every object in the language has a  type,  which  characterizes  a  set  of
  3792. values  and  a set of applicable operations.  The main classes of types are
  3793. scalar types (comprising enumeration and numeric types),  composite  types,
  3794. access types, and private types.
  3795. An  enumeration  type  defines  an  ordered  set  of  distinct  enumeration
  3796. literals, for example a list of states or an alphabet of  characters.   The
  3797. enumeration types BOOLEAN and CHARACTER are predefined.
  3798. Numeric  types provide a means of performing exact or approximate numerical
  3799. computations.  Exact computations use integer types, which denote  sets  of
  3800. consecutive  integers.   Approximate  computations  use  either fixed point
  3801. types, with absolute bounds on the error, or  floating  point  types,  with
  3802. relative  bounds  on  the  error.   The  numeric  types INTEGER, FLOAT, and
  3803. DURATION are predefined.
  3804. Composite types  allow  definitions  of  structured  objects  with  related
  3805. components.   The  composite  types  in the language provide for arrays and
  3806. records.  An array is an object with indexed components of the  same  type.
  3807. A  record  is  an object with named components of possibly different types.
  3808. The array type STRING is predefined.
  3809. A record may have special  components  called  discriminants.   Alternative
  3810. record structures that depend on the values of discriminants can be defined
  3811. within a record type.
  3812. Access  types  allow  the construction of linked data structures created by
  3813. the evaluation of allocators.  They allow several variables  of  an  access
  3814. type  to  designate  the  same  object,  and  components  of  one object to
  3815. designate the same or other objects.  Both the elements in  such  a  linked
  3816. data  structure  and their relation to other elements can be altered during
  3817. program execution.
  3818. Private types can be defined in a package that conceals structural  details
  3819. that  are  externally  irrelevant.  Only the logically necessary properties
  3820. (including any discriminants) are made visible to the users of such  types.
  3821. The  concept  of  a  type is refined by the concept of a subtype, whereby a
  3822. user can constrain the set of allowed values of a type.   Subtypes  can  be
  3823. used  to  define  subranges  of  scalar types, arrays with a limited set of
  3824. index values, and records and private types  with  particular  discriminant
  3825. values.
  3826. \uOther Facilities\n
  3827. Representation clauses can be used to specify the mapping between types and
  3828. features  of an underlying machine.  For example, the user can specify that
  3829. objects of a given type must be represented with a given number of bits, or
  3830. that the components of a record are to be represented using a given storage
  3831. layout.  Other features allow the controlled use of low level, nonportable,
  3832. or implementation-dependent aspects,  including  the  direct  insertion  of
  3833. machine code.
  3834. Input-output  is  defined  in  the  language by means of predefined library
  3835. packages.   Facilities  are  provided  for  input-output   of   values   of
  3836. user-defined   as   well   as  of  predefined  types.   Standard  means  of
  3837. representing values in display form are also provided.
  3838. Finally, the language provides a  powerful  means  of  parameterization  of
  3839. program units, called generic program units.  The generic parameters can be
  3840. types  and subprograms (as well as objects) and so allow general algorithms
  3841. to be applied to all types of a given class.
  3842. 1.5      \uMethod of Description and Syntax Notation\n
  3843. The form of Ada program units is  described  by  means  of  a  context-free
  3844. syntax  together with context-dependent requirements expressed by narrative
  3845. rules.
  3846. The meaning of Ada program units is described by means of  narrative  rules
  3847. defining  both  the effects of each construct and the composition rules for
  3848. constructs.   This  narrative  employs  technical   terms   whose   precise
  3849. definition  is  given in the text (references to the section containing the
  3850. definition of a technical term appear at the end of each section that  uses
  3851. the term).
  3852. All other terms are in the English language and bear their natural meaning,
  3853. as  defined  in Webster's Third New International Dictionary of the English
  3854. Language.
  3855. The context-free syntax of the language is described using a simple variant
  3856. of Backus-Naur-Form.  In particular,
  3857. (a)  Lower case words, some containing embedded  underlines,  are  used  to
  3858.      denote syntactic categories, for example:
  3859.           adding_operator
  3860.      Whenever the name of a syntactic  category  is  used  apart  from  the
  3861.      syntax  rules  themselves,  spaces  take  the  place of the underlines
  3862.      (thus:  adding operator).
  3863. (b)  Boldface words are used to denote reserved words, for example:
  3864.           \uarray\n
  3865. (c)  Square brackets enclose optional items.  Thus the two following  rules
  3866.      are equivalent.
  3867.           return_statement ::= \ureturn\n [expression];
  3868.           return_statement ::= \ureturn\n; | \ureturn\n expression;
  3869. (d)  Braces enclose a repeated item.  The item  may  appear  zero  or  more
  3870.      times;  the repetitions occur from left to right as with an equivalent
  3871.      left-recursive rule.  Thus the two following rules are equivalent.
  3872.           term ::= factor {multiplying_operator factor}
  3873.           term ::= factor | term multiplying_operator factor
  3874. (e)  A  vertical  bar  separates  alternative  items   unless   it   occurs
  3875.      immediately  after  an  opening  brace,  in  which  case it stands for
  3876.      itself:
  3877.           letter_or_digit ::= letter | digit
  3878.           component_association ::= [choice {| choice} =>] expression
  3879. (f)  If the name of any syntactic category starts with an italicized  part,
  3880.      it  is  equivalent  to  the category name without the italicized part.
  3881.      The italicized part is intended to convey some  semantic  information.
  3882.      For example type_name and task_name are both equivalent to name alone.
  3883. Note:
  3884. The  syntax  rules describing structured constructs are presented in a form
  3885. that corresponds to the  recommended  paragraphing.   For  example,  an  if
  3886. statement is defined as
  3887.     if_statement ::=
  3888.         \uif\n condition \uthen\n
  3889.           sequence_of_statements
  3890.        {\uelsif\n condition \uthen\n
  3891.           sequence_of_statements}
  3892.        [\uelse\n
  3893.           sequence_of_statements]
  3894.         \uend if\n;
  3895. Different  lines  are  used for parts of a syntax rule if the corresponding
  3896. parts of the construct  described  by  the  rule  are  intended  to  be  on
  3897. different   lines.   Indentation  in  the  rule  is  a  recommendation  for
  3898. indentation of the corresponding part of the construct.  It is  recommended
  3899. that  all  indentations be by multiples of a basic step of indentation (the
  3900. number of spaces for the basic step is not defined).  The preferred  places
  3901. for  other  line  breaks  are  after  semicolons.   On the other hand, if a
  3902. complete construct can fit on  one  line,  this  is  also  allowed  in  the
  3903. recommended paragraphing.
  3904. 1.6      \uClassification of Errors\n
  3905. The   language   definition   classifies   errors  into  several  different
  3906. categories:
  3907. (a)  Errors that  must  be  detected  at  compilation  time  by  every  Ada
  3908.      compiler.
  3909.      These  errors  correspond  to  any  violation  of a rule given in this
  3910.      reference manual, other than the violations that correspond to (b)  or
  3911.      (c)  below.   In particular, violation of any rule that uses the terms
  3912.      must, allowed, legal,  or  illegal  belongs  to  this  category.   Any
  3913.      program  that  contains  such an error is not a legal Ada program;  on
  3914.      the other hand, the fact that a program is legal does  not  mean,  per
  3915.      se, that the program is free from other forms of error.
  3916. (b)  Errors that must be detected at run time by the execution  of  an  Ada
  3917.      program.
  3918.      The  corresponding  error  situations are associated with the names of
  3919.      the predefined exceptions.  Every Ada compiler is required to generate
  3920.      code  that  raises  the  corresponding  exception  if  such  an  error
  3921.      situation arises during program execution.  If an exception is certain
  3922.      to  be  raised  in  every  execution  of a program, then compilers are
  3923.      allowed (although not required) to report  this  fact  at  compilation
  3924.      time.
  3925. (c)  Erroneous execution.
  3926.      The language rules specify certain rules to be obeyed by Ada programs,
  3927.      although  there is no requirement on Ada compilers to provide either a
  3928.      compilation-time or a run-time detection  of  the  violation  of  such
  3929.      rules.   The  errors  of this category are indicated by the use of the
  3930.      word  erroneous  to  qualify  the  execution  of   the   corresponding
  3931.      constructs.  The effect of erroneous execution is unpredictable.
  3932. (d)  Incorrect order dependences.
  3933.      Whenever  the  reference  manual  specifies  that different parts of a
  3934.      given construct are to be executed in some order that is  not  defined
  3935.      by  the  language,  this  means  that the implementation is allowed to
  3936.      execute these parts in any  given  order,  following  the  rules  that
  3937.      result  from  that given order, but not in parallel.  Furthermore, the
  3938.      construct is incorrect if execution of  these  parts  in  a  different
  3939.      order  would  have  a different effect.  Compilers are not required to
  3940.      provide either compilation-time or  run-time  detection  of  incorrect
  3941.      order dependences.  The foregoing is expressed in terms of the process
  3942.      that  is  called  execution;  it applies equally to the processes that
  3943.      are called evaluation and elaboration.
  3944. If a compiler is able to recognize at compilation time that a construct  is
  3945. erroneous  or  contains an incorrect order dependence, then the compiler is
  3946. allowed to generate, in place of  the  code  otherwise  generated  for  the
  3947. construct,   code  that  raises  the  predefined  exception  PROGRAM_ERROR.
  3948. Similarly, compilers are allowed to generate code that checks at  run  time
  3949. for  erroneous  constructs,  for  incorrect order dependences, or for both.
  3950. The predefined exception PROGRAM_ERROR is raised if such a check fails.
  3951. 2.       \uLexical Elements\n
  3952. The  text  of  a program consists of the texts of one or more compilations.
  3953. The text of a \vcompilation\v1001. is a sequence of \vlexical elements\v202., each  composed
  3954. of  \vcharacters\v201.;   the  rules  of  composition  are  given  in this chapter.
  3955. \vPragmas\v210., which provide certain  information  for  the  compiler,  are  also
  3956. described in this chapter.
  3957. More details:
  3958.  2.1    \vCharacter Set\v201.
  3959.  2.2    \vLexical Elements, Separators and Delimiters\v202.
  3960.  2.3    \vIdentifiers\v203.
  3961.  2.4    \vNumeric Literals\v204.
  3962.  2.5    \vCharacter Literals\v207.
  3963.  2.6    \vString Literals\v208.
  3964.  2.7    \vComments\v209.
  3965.  2.8    \vPragmas\v210.
  3966.  2.9    \vReserved Words\v211.
  3967.  2.10   \vAllowed Replacements of Characters\v212.
  3968. 2.1      \uCharacter Set\n
  3969. The only  characters allowed in the text  of  a  program  are  the  graphic
  3970. characters  and  format effectors.  Each graphic character corresponds to a
  3971. unique code of the ISO seven-bit coded character set  (ISO  standard  646),
  3972. and  is  represented  (visually)  by  a  graphical  symbol.   Some  graphic
  3973. characters are represented by different graphical  symbols  in  alternative
  3974. national  representations of the ISO character set.  The description of the
  3975. language definition in  this  standard  reference  manual  uses  the  ASCII
  3976. graphical  symbols,  the ANSI graphical representation of the ISO character
  3977.     graphic_character ::= basic_graphic_character
  3978.        | lower_case_letter | other_special_character
  3979.     basic_graphic_character ::=
  3980.          upper_case_letter | digit
  3981.        | special_character | space_character
  3982.     basic_character ::=
  3983.          basic_graphic_character | format_effector
  3984. The basic character  set  is  sufficient  for  writing  any  program.   The
  3985. characters  included  in each of the categories of basic graphic characters
  3986. are defined as follows:
  3987. (a)  upper case letters
  3988.      A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  3989. (b)  digits
  3990.      0 1 2 3 4 5 6 7 8 9
  3991. (c)  special characters
  3992.      " # & ' ( ) * + , - . / : ; < = > _ |
  3993. (d)  the space character
  3994. Format effectors are the  ISO  (and  ASCII)  characters  called  horizontal
  3995. tabulation, vertical tabulation, carriage return, line feed, and form feed.
  3996. The  characters  included  in  each  of the remaining categories of graphic
  3997. characters are defined as follows:
  3998. (e)  lower case letters
  3999.      a b c d e f g h i j k l m n o p q r s t u v w x y z
  4000. (f)  other special characters
  4001.      ! $ % ? @ [ \\ ] ^ ` { } ~
  4002. Allowable replacements for the special characters vertical bar  (|),  sharp
  4003. (#), and quotation (") are defined in section 2.10.
  4004. \uNotes:\n
  4005. The  ISO  character  that  corresponds to the sharp graphical symbol in the
  4006. ASCII representation appears as a pound  sterling  symbol  in  the  French,
  4007. German, and United Kingdom standard national representations.  In any case,
  4008. the  font  design  of  graphical  symbols (for example, whether they are in
  4009. italic or bold typeface) is not part of the ISO standard.
  4010. The meanings of the acronyms used in this section  are  as  follows:   ANSI
  4011. stands for American National Standards Institute, ASCII stands for American
  4012. Standard Code for Information Interchange, and ISO stands for International
  4013. Organization for Standardization.
  4014. The following names are used when referring to special characters and other
  4015. special characters:
  4016.     symbol     name                        symbol     name
  4017.       "        quotation                     >        greater than
  4018.       #        sharp                         _        underline
  4019.       &        ampersand                     |        vertical bar
  4020.       '        apostrophe                    !        exclamation mark
  4021.       (        left parenthesis              $        dollar
  4022.       )        right parenthesis             %        percent
  4023.       *        star, multiply                ?        question mark
  4024.       +        plus                          @        commercial at
  4025.       ,        comma                         [        left square bracket
  4026.       -        hyphen, minus                 \\        back-slash
  4027.       .        dot, point, period            ]        right square bracket
  4028.       /        slash, divide                 ^        circumflex
  4029.       :        colon                         `        grave accent
  4030.       ;        semicolon                     {        left brace
  4031.       <        less than                     }        right brace
  4032.       =        equal                         ~        tilde
  4033. 2.2      \uLexical Elements, Separators, and Delimiters\n
  4034. The  text  of  a program consists of the texts of one or more compilations.
  4035. The text of each \vcompilation\v1001. is a sequence of  separate  lexical  elements.
  4036. Each  lexical  element is either a delimiter, an \videntifier\v203. (which may be a
  4037. \vreserved word\v211.), a \vnumeric literal\v204., a \vcharacter literal\v207., a  \vstring  literal\v208.,
  4038. or  a  \vcomment\v209..   The  effect  of  a program depends only on the particular
  4039. sequences of lexical elements that form  its  compilations,  excluding  the
  4040. comments, if any.
  4041. In  some  cases  an  explicit  separator  is  required to separate adjacent
  4042. lexical elements (namely, when  without  separation,  interpretation  as  a
  4043. single  lexical  element  is  possible).   A  separator  is  any of a space
  4044. character, a \vformat effector\v201., or the end of a line.  A \vspace character\v201. is a
  4045. separator except within a comment, a string literal, or a  space  character
  4046. literal.   Format  effectors  other  than  horizontal tabulation are always
  4047. separators.  Horizontal tabulation is a separator except within a  comment.
  4048. The end of a line is always a separator.  The language does not define what
  4049. causes  the end of a line.  However if, for a given implementation, the end
  4050. of a line is signified by one or more  characters,  then  these  characters
  4051. must  be format effectors other than horizontal tabulation.  In any case, a
  4052. sequence of one or more format effectors other than  horizontal  tabulation
  4053. must cause at least one end of line.
  4054. One  or  more  separators  are  allowed  between  any  two adjacent lexical
  4055. elements, before the first of each compilation,  or  after  the  last.   At
  4056. least  one separator is required between an identifier or a numeric literal
  4057. and an adjacent identifier or numeric literal.
  4058. A delimiter is either one of the following \vspecial characters\v201. (in the basic
  4059. character set)
  4060.     & ' ( ) * + , - . / : ; < = > |
  4061. or one of the following compound delimiters each composed of  two  adjacent
  4062. special characters
  4063.     =>   ..   **   :=   /=   >=   <=   <<   >>   <>
  4064. Each  of the special characters listed for single character delimiters is a
  4065. single delimiter except if this character is  used  as  a  character  of  a
  4066. compound  delimiter,  or  as  a  character  of  a  comment, string literal,
  4067. character literal, or numeric literal.
  4068. The remaining forms of lexical element are described in other  sections  of
  4069. this chapter.
  4070. \uNotes:\n
  4071. Each  lexical  element  must  fit on one line, since the end of a line is a
  4072. separator.  The quotation, sharp, and underline  characters,  likewise  two
  4073. adjacent  hyphens,  are  not delimiters, but may form part of other lexical
  4074. elements.
  4075. The following names are used when referring to compound delimiters:
  4076.     delimiter     name
  4077.        =>         arrow
  4078.        ..         double dot
  4079.        **         double star, exponentiate
  4080.        :=         assignment (pronounced: "becomes")
  4081.        /=         inequality (pronounced: "not equal")
  4082.        >=         greater than or equal
  4083.        <=         less than or equal
  4084.        <<         left label bracket
  4085.        >>         right label bracket
  4086.        <>         box
  4087. 2.3      \uIdentifiers\n
  4088. Identifiers are used as \vnames\v401. and also as \vreserved words\v211..
  4089.     identifier ::=
  4090.        letter {[underline] letter_or_digit}
  4091.     letter_or_digit ::= letter | digit
  4092.     letter ::= upper_case_letter | lower_case_letter
  4093. All  characters  of  an identifier are significant, including any underline
  4094. character inserted between a letter or \vdigit\v201.  and  an  adjacent  letter  or
  4095. digit.   Identifiers  differing  only in the use of corresponding upper and
  4096. \vlower case letters\v201. are considered as the same.
  4097. \uExamples:\n
  4098.     COUNT      X    get_symbol   Ethelyn   Marion
  4099.     SNOBOL_4   X1   PageCount    STORE_NEXT_ITEM
  4100. Note:
  4101. No space is allowed within an identifier since a \vspace\v201. is a \vseparator\v202..
  4102. 2.4      \uNumeric Literals\n
  4103. There are two classes of  numeric  \vliterals\v406.:   real  literals  and  integer
  4104. literals.   A  real literal is a numeric literal that includes a point;  an
  4105. integer literal is a numeric literal without a point.   Real  literals  are
  4106. the literals of the type \vuniversal_real\v316..  Integer literals are the literals
  4107. of the type \vuniversal_integer\v314..
  4108.     numeric_literal ::= decimal_literal | based_literal
  4109. More details:
  4110.  2.4.1  \vDecimal Literals\v205.
  4111.  2.4.2  \vBased Literals\v206.
  4112. 2.4.1    \uDecimal Literals\n
  4113. A  decimal  literal  is  a  numeric  literal  expressed in the conventional
  4114. decimal notation (that is, the base is implicitly ten).
  4115.     decimal_literal ::= integer [.integer] [exponent]
  4116.     integer  ::= digit {[underline] digit}
  4117.     exponent ::= E [+] integer | E - integer
  4118. An underline character  inserted  between  adjacent  \vdigits\v201.  of  a  decimal
  4119. literal does not affect the value of this \vnumeric literal\v204..  The letter E of
  4120. the exponent, if any, can be written either in \vlower case\v201. or in upper case,
  4121. with the same meaning.
  4122. An  exponent  indicates  the power of ten by which the value of the decimal
  4123. literal without the exponent is to be multiplied to obtain the value of the
  4124. decimal literal with the exponent.  An exponent for an integer literal must
  4125. not have a minus sign.
  4126. \uExamples:\n
  4127.     12        0      1E6    123_456     --  integer literals
  4128.     12.0      0.0    0.456  3.14159_26  --  real literals
  4129.     1.34E-12  1.0E+6  --  real literals with exponent
  4130. \uNotes:\n
  4131. Leading zeros are allowed.  No space is allowed in a numeric  literal,  not
  4132. even between constituents of the exponent, since a \vspace\v201. is a \vseparator\v202..  A
  4133. zero exponent is allowed for an integer literal.
  4134. 2.4.2    \uBased Literals\n
  4135. A based literal is a \vnumeric literal\v204. expressed in a form that specifies the
  4136. base explicitly.  The base must be at least two and at most sixteen.
  4137.     based_literal ::=
  4138.        base # based_integer [.based_integer] # [exponent]
  4139.     base ::= integer
  4140.     based_integer ::=
  4141.        extended_digit {[underline] extended_digit}
  4142.     extended_digit ::= digit | letter
  4143. An underline character inserted between adjacent \vdigits\v201. of a based  literal
  4144. does  not  affect  the  value  of  this  numeric literal.  The base and the
  4145. \vexponent\v205., if any, are in decimal notation.  The  only  \vletters\v203.  allowed  as
  4146. extended  digits  are  the  letters  A through F for the digits ten through
  4147. fifteen.  A letter in a based literal (either  an  extended  digit  or  the
  4148. letter  E  of  an exponent) can be written either in \vlower\v201. case or in \vupper\v201.
  4149. case, with the same meaning.
  4150. The conventional meaning of based notation is assumed;  in  particular  the
  4151. value of each extended digit of a based literal must be less than the base.
  4152. An exponent indicates the power of the base by which the value of the based
  4153. literal without the exponent is to be multiplied to obtain the value of the
  4154. based literal with the exponent.
  4155. \uExamples:\n
  4156.   2#1111_1111#   16#FF#       016#0FF#    --  integer literals of value 255
  4157.   16#E#E1        2#1110_0000 #            --  integer literals of value 224
  4158.   16#F.FF#E+2    2#1.1111_1111_111#E11    --  real literals of value 4095.0
  4159. 2.5      \uCharacter Literals\n
  4160. A character  \vliteral\v406.   is  formed  by  enclosing  one  of  the  95  \vgraphic\v201.
  4161. characters  (including  the  \vspace\v201.)  between  two apostrophe characters.  A
  4162. character  has a value that belongs to a \vcharacter type\v312..
  4163.     character_literal ::= 'graphic_character'
  4164. \uExamples:\n
  4165.     'A'   '*'   '''   ' '
  4166. 2.6      \uString Literals\n
  4167. A  string  literal  is formed by a sequence of \vgraphic characters\v201. (possibly
  4168. none) enclosed between two quotation characters used as string brackets.
  4169.     string_literal ::= "{graphic_character}"
  4170. A string literal has a  value  that  is  a  sequence  of  \vcharacter  values\v312.
  4171. corresponding  to  the  graphic characters of the string literal apart from
  4172. the quotation character itself.  If a quotation character value  is  to  be
  4173. represented  in  the  sequence of character values, then a pair of adjacent
  4174. quotation characters must be written at the corresponding place within  the
  4175. string  literal.   (This  means  that  a  string  literal that includes two
  4176. adjacent quotation characters is never interpreted as two  adjacent  string
  4177. literals.)
  4178. The  length  of  a  string literal is the number of character values in the
  4179. sequence represented.  (Each doubled quotation character is  counted  as  a
  4180. single character.)
  4181. \uExamples:\n
  4182.     "Message of the day:"
  4183.     ""                     --  an empty string literal
  4184.     " "   "A"   """"       --  three string literals of length 1
  4185.     "Characters such as $, %, and } are allowed in string literals"
  4186. Note:
  4187. A  string  literal  must fit on one line since it is a \vlexical element\v202. (see
  4188. 2.2).  Longer sequences of graphic character  values  can  be  obtained  by
  4189. \vcatenation\v414.  of string literals.  Similarly catenation of \vconstants\v303. \vdeclared\v301.
  4190. in the package ASCII can be used to obtain sequences  of  character  values
  4191. that   include   nongraphic   character   values   (the  so-called  control
  4192. characters).  Examples of such uses of catenation are given below:
  4193.     "FIRST PART OF A SEQUENCE OF CHARACTERS " &
  4194.     "THAT CONTINUES ON THE NEXT LINE"
  4195.     "sequence that includes the" & ASCII.ACK & "control character"
  4196. 2.7      \uComments\n
  4197. A comment starts with two adjacent hyphens and extends up to the \vend of the\v202.
  4198. \vline\v202..  A comment can appear on any line of  a  program.   The  presence  or
  4199. absence  of  comments  has  no  influence  on whether a program is \vlegal\v108. or
  4200. \villegal\v108..  Furthermore,  comments do not influence the effect of a  program;
  4201. their sole purpose is the enlightenment of the human reader.
  4202. \uExamples:\n
  4203.     --  the last sentence above echoes the Algol 68 report
  4204.     \uend\n;  --  processing of LINE is complete
  4205.     --  a long comment may be split onto
  4206.     --  two or more consecutive lines
  4207.     ----------------  the first two hyphens start the comment
  4208. Note:
  4209. Horizontal  tabulation  can   be used in comments, after the double hyphen,
  4210. and is equivalent to one or more \vspaces\v201. (see 2.2).
  4211. 2.8      \uPragmas\n
  4212. A pragma is used to convey information to the \vcompiler\v1001..   A  pragma  starts
  4213. with the \vreserved word\v211. pragma followed by an identifier that is the name of
  4214. the pragma.
  4215.     \upragma\n ::=
  4216.        \upragma\n \videntifier\v203. [(argument_association {, argument_association})];
  4217.     argument_association ::=
  4218.          [argument_identifier =>] \vname\v401.
  4219.        | [argument_identifier =>] \vexpression\v410.
  4220. Pragmas are only allowed at the following places in a program:
  4221.   -  After  a  semicolon  \vdelimiter\v202.,  but  not  within  a  \vformal  part\v601.  or
  4222.      \vdiscriminant part\v326..
  4223.   -  At any place where the syntax rules allow a  construct  defined  by  a
  4224.      syntactic  category  whose  name ends with "declaration", "\vstatement\v500.",
  4225.      "clause", or "alternative", or one of the syntactic categories \vvariant\v328.
  4226.      and \vexception handler\v1102.;  but not in place of such a construct.  Also at
  4227.      any place where a compilation unit would be allowed.
  4228. Additional restrictions exist for the placement of specific pragmas.
  4229. Some  pragmas  have  arguments.   Argument  associations  can   be   either
  4230. positional  or named as for parameter associations of subprogram calls (see
  4231. 6.4).  Named associations are,  however,  only  possible  if  the  argument
  4232. identifiers are defined.  A name given in an argument must be either a name
  4233. \vvisible\v803. at the place of the pragma or an identifier specific to the pragma.
  4234. The pragmas defined by the language are described in Annex B:  they must be
  4235. supported  by  every  implementation.   In  addition, an implementation may
  4236. provide \vimplementation-defined pragmas\v2000., which must  then  be  described  in
  4237. Appendix  F.   An  implementation  is  not  allowed to define pragmas whose
  4238. presence or absence influences  the  \vlegality\v108.  of  the  text  outside  such
  4239. pragmas.   Consequently,  the  legality of a program does not depend on the
  4240. presence or absence of implementation-defined pragmas.
  4241. A pragma that is not \vlanguage-defined\v1600. has no effect if  its  identifier  is
  4242. not  recognized  by  the  (current)  implementation.  Furthermore, a pragma
  4243. (whether language-defined or implementation-defined) has no effect  if  its
  4244. placement  or  its  arguments  do not correspond to what is allowed for the
  4245. pragma.  The region of text over which a pragma has an  effect  depends  on
  4246. the pragma.
  4247. \uExamples:\n
  4248.     \upragma\n LIST(OFF);
  4249.     \upragma\n OPTIMIZE(TIME);
  4250.     \upragma\n INLINE(SETMASK);
  4251.     \upragma\n SUPPRESS(RANGE_CHECK, ON => INDEX);
  4252. Note:
  4253. It  is  recommended  (but not required) that implementations issue warnings
  4254. for pragmas that are not recognized and therefore ignored.
  4255. 2.9      \uReserved Words\n
  4256. The \videntifiers\v203. listed below are called reserved words and are reserved for
  4257. special significance in the language.  For readability of this manual,  the
  4258. reserved words appear in \vlower case\v201. boldface.
  4259.     \uabort       declare      generic    of           select\n
  4260.     \uabs         delay        goto       or           separate\n
  4261.     \uaccept      delta                   others       subtype\n
  4262.     \uaccess      digits       if         out\n
  4263.     \uall         do           in                      task\n
  4264.     \uand                      is         package      terminate\n
  4265.     \uarray                               pragma       then\n
  4266.     \uat          else                    private      type\n
  4267.                 \uelsif        limited    procedure\n
  4268.                 \uend          loop\n
  4269.     \ubegin       entry                   raise        use\n
  4270.     \ubody        exception               range\n
  4271.                 \uexit         mod        record       when\n
  4272.                                         \urem          while\n
  4273.                              \unew        renames      with\n
  4274.     \ucase        for          not        return\n
  4275.     \uconstant    function     null       reverse      xor\n
  4276. A reserved word must not be used as a declared identifier.
  4277. \uNotes:\n
  4278. Reserved  words  differing only in the use of corresponding upper and lower
  4279. case letters are considered as the same (see 2.3).  In some \vattributes\v405.  the
  4280. identifier  that appears after the apostrophe is identical to some reserved
  4281. word.
  4282. 2.10     \uAllowable Replacements of Characters\n
  4283. The  following  replacements  are  allowed for the vertical bar, sharp, and
  4284. quotation \vbasic characters\v201.:
  4285.   -  A vertical bar character (|) can be replaced by  an  exclamation  mark
  4286.      (!)  where used as a \vdelimiter\v202..
  4287.   -  The sharp characters (#) of a \vbased literal\v206. can be replaced by  colons
  4288.      (:) provided that the replacement is done for both occurrences.
  4289.   -  The quotation characters (") used as \vstring brackets\v208. at both ends of a
  4290.      \vstring literal\v208. can be replaced by percent characters (%) provided that
  4291.      the  enclosed  sequence of characters contains no quotation character,
  4292.      and provided that both string  brackets  are  replaced.   Any  percent
  4293.      character  within  the sequence of characters must then be doubled and
  4294.      each such doubled percent character is interpreted as a single percent
  4295.      \vcharacter value\v312..
  4296. These replacements do not change the meaning of the program.
  4297. \uNotes:\n
  4298. It is recommended that use of the replacements for the vertical bar, sharp,
  4299. and quotation characters be restricted to  cases  where  the  corresponding
  4300. \vgraphical symbols\v201. are not available.  Note that the vertical bar appears as
  4301. a  broken  bar  on  some equipment;  replacement is not recommended in this
  4302. case.
  4303. The rules given for \videntifiers\v203. and \vnumeric literals\v204. are  such  that  \vlower\v201.
  4304. \vcase  and  upper  case\v201.  letters  can  be used indifferently;  these \vlexical\v202.
  4305. \velements\v202. can thus be written using only characters of the  basic  character
  4306. set.  If a string literal of the predefined type STRING contains characters
  4307. that  are  not  in  the basic character set, the same sequence of character
  4308. values can be obtained by \vcatenating\v414.  string  literals  that  contain  only
  4309. characters  of  the  basic  character set with suitable character constants
  4310. declared in the \vpredefined package ASCII\v1700..  Thus the string literal  "AB$CD"
  4311. could  be  replaced  by  "AB" & ASCII.DOLLAR & "CD".  Similarly, the string
  4312. literal "ABcd" with  lower  case  letters  could  be  replaced  by  "AB"  &
  4313. ASCII.LC_C & ASCII.LC_D.
  4314. 3.       \uDeclarations and Types\n
  4315. This  chapter  describes  the  types  in  the  language  and  the rules for
  4316. declaring constants, variables, and named numbers.
  4317.  3.1    \vDeclarations\v301.
  4318.  3.2    \vObjects and Named Numbers\v302.
  4319.  3.3    \vTypes and Subtypes\v305.
  4320.  3.4    \vDerived Types\v309.
  4321.  3.5    \vScalar Types\v310.
  4322.  3.6    \vArray Types\v321.
  4323.  3.7    \vRecord Types\v325.
  4324.  3.8    \vAccess Types\v330.
  4325.  3.9    \vDeclarative Parts\v333.
  4326. 3.1      \uDeclarations\n
  4327. The language defines several kinds of entities that  are  declared,  either
  4328. explicitly or implicitly, by declarations.  Such an entity can be a \vnumeric\v204.
  4329. \vliteral\v204.,  an  object, a discriminant, a \vrecord component\v325., a loop parameter,
  4330. an exception, a type, a subtype, a subprogram, a package, a  task  unit,  a
  4331. generic  unit,  a  single  entry, an entry family, a formal parameter (of a
  4332. subprogram, entry, or \vgeneric subprogram\v1201.), a generic  formal  parameter,  a
  4333. named  block  or loop, a labeled statement, or an \voperation\v305. (in particular,
  4334. an \vattribute\v405. or an enumeration literal;  see 3.3.3).
  4335. There are several forms of declaration.  A basic declaration is a  form  of
  4336. declaration defined as follows.
  4337.     basic_declaration ::=
  4338.          \vobject_declaration\v303.     | \vnumber_declaration\v304.
  4339.        | \vtype_declaration\v306.       | subtype_declaration
  4340.        | subprogram_declaration | \vpackage_declaration\v701.
  4341.        | task_declaration       | generic_declaration
  4342.        | exception_declaration  | generic_instantiation
  4343.        | \vrenaming_declaration\v805.   | deferred_constant_declaration
  4344. Certain  forms  of declaration always occur (explicitly) as part of a basic
  4345. declaration;   these  forms  are  \vdiscriminant  specifications\v326.,   \vcomponent\v325.
  4346. \vdeclarations\v325.,   \ventry   declarations\v905.,   \vparameter specifications\v601.,  \vgeneric\v1201.
  4347. \vparameter declarations\v1201., and \venumeration  literal  specifications\v311..   A  \vloop\v506.
  4348. \vparameter  specification\v506.  is  a  form  of  declaration  that occurs only in
  4349. certain forms of loop statement.
  4350. The remaining forms of declaration are implicit:  the \vname\v401. of a block,  the
  4351. name  of  a  loop,  and a statement label are implicitly declared.  Certain
  4352. operations are implicitly declared (see 3.3.3).
  4353. For each form of declaration the language rules define a certain region  of
  4354. text  called  the  \vscope\v802.  of  the  declaration (see 8.2).  Several forms of
  4355. declaration associate an \videntifier\v203. with a  declared  entity.   Within  its
  4356. scope,  and  only  there,  there are places where it is possible to use the
  4357. identifier to refer to the associated declared entity;   these  places  are
  4358. defined  by  the \vvisibility\v803. rules (see 8.3).  At such places the identifier
  4359. is said to be a name of the entity (its \vsimple name\v401.);  the name is said  to
  4360. denote the associated entity.
  4361. Certain  forms  of  enumeration literal specification associate a \vcharacter\v207.
  4362. \vliteral\v207.  with  the  corresponding  declared  entity.   Certain   forms   of
  4363. declaration  associate  an  \voperator  symbol\v601. or some other notation with an
  4364. explicitly or implicitly declared operation.
  4365. The process by which a  declaration  achieves  its  effect  is  called  the
  4366. \velaboration\v333.  of  the  declaration;   this  process  happens  during program
  4367. execution.
  4368. After its elaboration, a declaration is said to be  elaborated.   Prior  to
  4369. the  completion  of its elaboration (including before the elaboration), the
  4370. declaration is not yet elaborated.  The elaboration of any declaration  has
  4371. always  at least the effect of achieving this change of state (from not yet
  4372. elaborated to elaborated).   The  phrase  "the  elaboration  has  no  other
  4373. effect"  is  used  in this manual whenever this change of state is the only
  4374. effect of elaboration for some form of declaration.  An elaboration process
  4375. is also defined for \vdeclarative parts\v333., \vdeclarative items\v333.,  and  compilation
  4376. units (see 3.9 and 10.5).
  4377. Object,  number,  type,  and  \vsubtype declarations\v307. are described here.  The 
  4378. remaining basic declarations are described in later chapters.
  4379. Note:
  4380. The syntax rules use the term identifier for the  first  occurrence  of  an
  4381. identifier  in  some form of declaration;  the term simple name is used for
  4382. any occurrence of an identifier that already denotes some declared  entity.
  4383. 3.2      \uObjects and Named Numbers\n
  4384. An  object  is  an  entity that contains (has) a value of a given \vtype\v305..  An
  4385. object is one of the following:
  4386.   -  an object declared by an  object  \vdeclaration\v301.  or  by  a  \vsingle\v901.
  4387.      \vtask declaration\v901.,
  4388.   -  a \vformal parameter\v601. of a \vsubprogram\v600., \ventry\v905., or \vgeneric subprogram\v1201.,
  4389.   -  a generic formal object,
  4390.   -  a \vloop parameter\v506.,
  4391.   -  an object \vdesignated\v330. by a value of an \vaccess type\v330.,
  4392.   -  a \vcomponent\v305. or a \vslice\v403. of another object.
  4393. A  number  declaration  is  a  special  form  of  object  declaration  that
  4394. associates  an  identifier  with  a  value  of  \vtype\v305.  \vuniversal_integer\v314.  or
  4395. \vuniversal_real\v316.
  4396.     object_declaration ::=
  4397.          identifier_list : [\uconstant\n] \vsubtype_indication\v307. [:= \vexpression\v410.];
  4398.        | identifier_list : [\uconstant\n] \vconstrained_array_definition\v321.
  4399.                                                          [:= expression];
  4400.     number_declaration ::=
  4401.          identifier_list : \uconstant\n := universal_static_expression;
  4402.     identifier_list ::=  identifier {, identifier}
  4403. An  object  declaration  is  called  a  single  object  declaration  if its
  4404. identifier list has a single identifier;  it is called  a  multiple  object
  4405. declaration if the identifier list has two or more identifiers.  A multiple
  4406. object  declaration is equivalent to a sequence of the corresponding number
  4407. of single object declarations.   For  each  identifier  of  the  list,  the
  4408. equivalent  sequence  has  a  single  object  declaration  formed  by  this
  4409. identifier, followed by a colon and by whatever appears at the right of the
  4410. colon in the multiple object declaration;  the equivalent  sequence  is  in
  4411. the same order as the identifier list.
  4412. A  similar  equivalence  applies  also  for  the identifier lists of number
  4413. declarations,   component   declarations,   \vdiscriminant\v326.    \vspecifications\v326.,
  4414. parameter   specifications,   generic   parameter  declarations,  \vexception\v1101.
  4415. \vdeclarations\v1101., and \vdeferred constant declarations\v704..
  4416. In the remainder of this  reference  manual,  explanations  are  given  for
  4417. declarations  with a single identifier;  the corresponding explanations for
  4418. declarations with several identifiers follow from  the  equivalence  stated
  4419. above.
  4420. Example:
  4421.     --  the multiple object declaration
  4422.     JOHN, PAUL : PERSON_NAME := new PERSON(SEX => M);  --  see 3.8.1
  4423.     --  is  equivalent  to  the two single object declarations in the order
  4424.         given
  4425.     JOHN : PERSON_NAME := \unew\n PERSON(SEX => M);
  4426.     PAUL : PERSON_NAME := \unew\n PERSON(SEX => M);
  4427. More details:
  4428.  3.2.1  \vObject Declarations\v303.
  4429.  3.2.2  \vNumber Declarations\v304.
  4430. 3.2.1    \uObject Declarations\n
  4431. An object \vdeclaration\v301. declares an object whose \vtype\v305. is given  either  by  a
  4432. \vsubtype\v305.  indication  or  by  a \vconstrained array definition\v321..  If the object
  4433. declaration includes the  \vassignment  compound  delimiter\v502.  followed  by  an
  4434. \vexpression\v410.,  the  expression  specifies  an  initial value for the declared
  4435. object;  the type of the expression must be that of the object.
  4436. The declared object is a constant if the \vreserved word\v211. constant appears  in
  4437. the  object  declaration;   the  declaration  must then include an explicit
  4438. initialization.   The  value  of  a  constant  cannot  be  modified   after
  4439. initialization.   Formal  parameters of \vmode in\v601. of \vsubprograms\v600. and entries,
  4440. and \vgeneric formal parameters\v1201. of mode  in,  are  also  constants;   a  loop
  4441. parameter  is  a constant within the corresponding loop;  a \vsubcomponent\v305. or
  4442. \vslice\v403. of a constant is a constant.
  4443. An object that is not a constant is called a variable (in  particular,  the
  4444. object declared by an object declaration that does not include the reserved
  4445. word  constant  is  a  variable).   The  only ways to change the value of a
  4446. variable are either directly by  an  \vassignment\v502.,  or  indirectly  when  the
  4447. variable  is updated (see 6.2) by a procedure or \ventry\v905. call statement (this
  4448. action can be performed either on the variable itself, on a subcomponent of
  4449. the variable, or on  another  variable  that  has  the  given  variable  as
  4450. subcomponent).
  4451. The \velaboration\v333. of an object declaration proceeds as follows:
  4452. (a)  The \vsubtype indication\v307. or the constrained array  definition  is  first
  4453.      elaborated.  This establishes the subtype of the object.
  4454. (b)  If the object declaration includes  an  explicit  initialization,  the
  4455.      initial value  is obtained by evaluating the corresponding expression.
  4456.      Otherwise  any  implicit  initial  values  for  the  object or for its
  4457.      subcomponents are evaluated.
  4458. (c)  The object is created.
  4459. (d)  Any initial value (whether explicit or implicit) is  assigned  to  the
  4460.      object or to the corresponding subcomponent.
  4461. Implicit  initial  values  are  defined  for  objects  declared  by  object
  4462. declarations, and for components of such objects, in the  following  cases:
  4463.   -  If the type of an object is an \vaccess type\v330., the implicit initial value
  4464.      is the null value of the access type.
  4465.   -  If the type of an object is a \vtask type\v902.,  the  implicit  initial  (and
  4466.      only) value \vdesignates\v330. a corresponding \vtask\v900..
  4467.   -  If the type of an object is a type with discriminants and the  subtype
  4468.      of the object is constrained, the implicit initial (and only) value of
  4469.      each \vdiscriminant\v305. is defined by the subtype of the object.
  4470.   -  If the type of an object is a composite  type,  the  implicit  initial
  4471.      value  of  each \vcomponent\v305. that has a default expression is obtained by
  4472.      \vevaluation\v411. of this expression, unless the component is a  discriminant
  4473.      of a constrained object (the previous case).
  4474. In  the  case  of  a  component that is itself a composite object and whose
  4475. value is defined neither by an explicit initialization  nor  by  a  default
  4476. expression,  any  implicit  initial  values for components of the composite
  4477. object are defined by the same rules as for a declared object.
  4478. The steps (a) to (d) are performed in the order indicated.  For  step  (b),
  4479. if  the  default  expression  for  a  discriminant  is evaluated, then this
  4480. evaluation  is  performed  before   that   of   default   expressions   for
  4481. subcomponents that depend on discriminants, and also before that of default
  4482. expressions  that  include  the  name  of the discriminant.  Apart from the
  4483. previous rule, the evaluation of default expressions is performed  \vin  some\v108.
  4484. \vorder\v108. that is not defined by the language.
  4485. The  initialization  of  an  object  (the  declared  object  or  one of its
  4486. subcomponents) checks that the initial value belongs to the subtype of  the
  4487. object;  for an array object declared by an object declaration, an implicit
  4488. subtype  \vconversion\v419. is first applied as for an assignment statement, unless
  4489. the object is a constant whose subtype is an unconstrained array type.  The
  4490. \vexception CONSTRAINT_ERROR\v1101. is raised if this check fails.
  4491. The value of a scalar  variable  is  undefined  after  elaboration  of  the
  4492. corresponding object declaration unless an initial value is assigned to the
  4493. variable by an initialization (explicitly or implicitly).
  4494. If  the  operand of a type conversion or \vqualified expression\v420. is a variable
  4495. that has scalar subcomponents with undefined values, then the values of the
  4496. corresponding subcomponents of the result are undefined.  The execution  of
  4497. a  program  is erroneous if it attempts to evaluate  a scalar variable with
  4498. an undefined value.  Similarly, the execution of a program is erroneous  if
  4499. it  attempts to apply a \vpredefined operator\v411. to a variable that has a scalar
  4500. subcomponent with an undefined value.
  4501. Examples of variable declarations:
  4502.     COUNT, SUM  : INTEGER;
  4503.     SIZE        : INTEGER \urange\n 0 .. 10_ := 0;
  4504.     SORTED      : BOOLEAN := FALSE;
  4505.     COLOR_TABLE : \uarray\n(1 .. N) \uof\n COLOR;
  4506.     OPTION      : BIT_VECTOR(1 .. 10) := (others => TRUE);
  4507. Examples of constant declarations:
  4508.     LIMIT     : \uconstant\n INTEGER := 10_
  4509.     LOW_LIMIT : \uconstant\n INTEGER := LIMIT/10;
  4510.     TOLERANCE : \uconstant\n REAL := DISPERSION(1.15);
  4511. Note:
  4512. The expression  initializing  a  constant  object  need  not  be  a  static
  4513. expression  (see  4.9).   In  the  above  examples, LIMIT and LOW_LIMIT are
  4514. initialized with static expressions, but TOLERANCE is not if DISPERSION  is
  4515. a user-defined function.
  4516. 3.2.2    \uNumber Declarations\n
  4517. A  number  declaration is a special form of constant declaration.  The \vtype\v305.
  4518. of  the  static  expression  given  for  the  initialization  of  a  number
  4519. declaration   must  be  either  the  type  \vuniversal_integer\v314.  or  the  type
  4520. \vuniversal_real\v316..  The constant declared by a number declaration is called  a
  4521. named number and has the type of the \vstatic expression\v422..
  4522. Note:
  4523. The  rules  concerning  expressions  of  a  \vuniversal type\v405. are explained in
  4524. section 4.10.  It is a consequence of these rules  that  if  every  \vprimary\v410.
  4525. contained  in  the  expression  is  of the type universal_integer, then the
  4526. named number is also of this type.  Similarly, if every primary is  of  the
  4527. type universal_real, then the named number is also of this type.
  4528. Examples of number declarations:
  4529.   PI            : \uconstant\n := 3.14159_26536; -- a real number
  4530.   TWO_PI        : \uconstant\n := 2.0*PI;        -- a real number
  4531.   MAX           : \uconstant\n := 5              -- an integer number
  4532.   POWER_16      : \uconstant\n := 2**16;         -- the integer 65_536
  4533.   ONE, UN, EINS : \uconstant\n := 1;             -- three different names for 1
  4534. 3.3      \uTypes and Subtypes\n
  4535. A type is characterized by a set of values and a set of operations.
  4536. There exist several classes of types.  Scalar types are integer types, real
  4537. types,  and  types defined by enumeration of their values;  values of these
  4538. types have no components.   Array and \vrecord types\v325. are composite;  a  value
  4539. of a composite type consists of component values.  An \vaccess\v330. \vtype\v330. is a type
  4540. whose  values provide access to \vobjects\v303.. \vPrivate types\v704. are types for which
  4541. the set of possible values is well defined, but not directly  available  to
  4542. the  users  of  such types.  Finally, there are \vtask types\v901..  (Private types
  4543. are described in chapter 7, task types are  described  in  chapter  9,  the
  4544. other classes of types are described in this chapter.)
  4545. Certain   record   and   private   types  have  special  components  called
  4546. discriminants whose values distinguish alternative forms of values  of  one
  4547. of  these  types.   If  a private type has discriminants, they are known to
  4548. users of the type.  Hence a private type is only known  by  its  name,  its
  4549. discriminants if any, and by the corresponding set of operations.
  4550. The  set  of possible values for an object of a given type can be subjected
  4551. to a condition that is called a constraint (the case where  the  constraint
  4552. imposes  no  restriction  is  also included);  a value is said to satisfy a
  4553. constraint if it satisfies the corresponding condition.   A  subtype  is  a
  4554. type together with a constraint;  a value is said to belong to a subtype of
  4555. a  given  type if it belongs to the type and satisfies the constraint;  the
  4556. given type is called the base type of the subtype.  A type is a subtype  of
  4557. itself;   such  a subtype is said to be unconstrained:  it corresponds to a
  4558. condition that imposes no restriction.  The base type of a type is the type
  4559. itself.
  4560. The set of operations defined for a subtype of a given  type  includes  the
  4561. operations that are defined for the type;  however the \vassignment\v502. operation
  4562. to a variable having a given subtype only assigns values that belong to the
  4563. subtype.   Additional  operations,  such  as  qualification (in a qualified
  4564. expression), are implicitly defined by a \vsubtype declaration\v307..
  4565. Certain types have default initial values defined for objects of the  type;
  4566. certain  other  types  have  default expressions defined for some or all of
  4567. their components.  Certain operations of  types  and  subtypes  are  called
  4568. \vattributes\v405.;   these operations are denoted by the form of name described in
  4569. section 4.1.4.
  4570. The term subcomponent is used in this manual in place of the term component
  4571. to indicate either a component, or a  component  of  another  component  or
  4572. subcomponent.   Where  other subcomponents are excluded, the term component
  4573. is used instead.
  4574. A given type must not have a subcomponent whose  type  is  the  given  type
  4575. itself.
  4576. The  name  of  a  class  of types is used in this manual as a qualifier for
  4577. objects and values that have a type of the class considered.  For  example,
  4578. the  term "array object" is used for an object whose type is an \varray type\v321.;
  4579. similarly, the term "access value" is used for a value of an  access  type.
  4580. Note:
  4581. The  set of values of a subtype is a subset of the values of the base type.
  4582. This subset need not be a proper subset;  it can be an empty subset.
  4583. More details:
  4584.  3.3.1  \vType Declarations\v306.
  4585.  3.3.2  \vSubtype Declarations\v307.
  4586.  3.3.3  \vClassification of Operations\v308.
  4587. 3.3.1  \uType Declarations\n
  4588. A type \vdeclaration\v301. declares a \vtype\v305..
  4589.     type_declaration ::=  full_type_declaration
  4590.        | incomplete_type_declaration | private_type_declaration
  4591.     full_type_declaration ::=
  4592.          \utype\n \videntifier\v203. [discriminant_part] \uis\n type_definition;
  4593.     type_definition ::=
  4594.          \venumeration_type_definition\v311. | \vinteger_type_definition\v314.
  4595.        | \vreal_type_definition\v316.        | array_type_definition
  4596.        | record_type_definition      | access_type_definition
  4597.        | derived_type_definition
  4598. The  \velaboration\v333.  of a full type declaration consists of the elaboration of
  4599. the \vdiscriminant part\v326., if  any  (except  in  the  case  of  the  full  type
  4600. declaration  for  an incomplete or \vprivate type declaration\v704.), and of the
  4601. elaboration of the type definition.
  4602. The types created by the  elaboration  of  distinct  type  definitions  are
  4603. distinct  types.   Moreover,  the  elaboration of the type definition for a
  4604. \vnumeric\v310. or \vderived type\v309. creates both a \vbase type\v305. and a subtype of the  base
  4605. type;   the  same  holds for a \vconstrained array definition\v321. (one of the two
  4606. forms of \varray type definition\v321.).
  4607. The simple name declared by a full type declaration  denotes  the  declared
  4608. type,  unless  the type declaration declares both a base type and a subtype
  4609. of the base type, in which case the simple name denotes  the  subtype,  and
  4610. the  base  type  is anonymous.  A type is said to be anonymous if it has no
  4611. simple name.  For explanatory purposes,  this  reference  manual  sometimes
  4612. refers  to an anonymous type by a pseudo-name, written in italics, and uses
  4613. such  pseudo-names  at  places  where  the  syntax  normally  requires   an
  4614. identifier.
  4615. Examples of type definitions:
  4616.     (WHITE, RED, YELLOW, GREEN, BLUE, BROWN, BLACK)
  4617.     range1 .. 72
  4618.     \uarray\n(1 .. 10) \uof\n INTEGER
  4619. Examples of type declarations:
  4620.     \utype\n COLOR  \uis\n (WHITE, RED, YELLOW, GREEN, BLUE, BROWN, BLACK);
  4621.     \utype\n COLUMN \uis range\n 1 .. 72;
  4622.     \utype\n TABLE  \uis array\n(1 .. 10) \uof\n INTEGER;
  4623. \uNotes:\n
  4624. Two  type  definitions  always  define two distinct types, even if they are
  4625. textually identical.   Thus,  the  array  type  definitions  given  in  the
  4626. declarations of A and B below define distinct types.
  4627.     A : \uarray\n(1 .. 10) \uof\n BOOLEAN;
  4628.     B : \uarray\n(1 .. 10) \uof\n BOOLEAN;
  4629. If  A  and  B are declared by a \vmultiple object declaration\v302. as below, their
  4630. types are nevertheless different, since the multiple object declaration  is
  4631. equivalent to the above two single object declarations.
  4632.     A, B : \uarray\n(1 .. 10) \uof\n BOOLEAN;
  4633. \vIncomplete  type  declarations\v331. are used for the definition of recursive and
  4634. mutually dependent types (see 3.8.1).  Private type declarations  are  used
  4635. in  package  specifications  and in \vgeneric parameter declarations\v1201. (see 7.4
  4636. and 12.1).
  4637. 3.3.2    \uSubtype Declarations\n
  4638. A \vsubtype\v305. \vdeclaration\v301. declares a subtype.
  4639.     subtype_declaration ::=
  4640.        \usubtype\n identifier \uis\n subtype_indication;
  4641.     subtype_indication ::=  type_mark [constraint]
  4642.     type_mark ::= type_name | subtype_name
  4643.     constraint ::=
  4644.       \vrange_constraint\v310. | \vfloating_point_constraint\v317. | fixed_point_constraint
  4645.     | \vindex_constraint\v322. | discriminant_constraint
  4646. A  \vtype\v305.  mark denotes a type or a subtype.  If a type mark is the name of a
  4647. type,  the  type  mark  denotes  this  type  and  also  the   corresponding
  4648. \vunconstrained subtype\v305..  The \vbase type\v305. of a type mark is, by definition, the
  4649. base type of the type or subtype denoted by the type mark.
  4650. A  subtype  indication defines a subtype of the base type of the type mark.
  4651. If an index constraint appears after a type mark in a  subtype  indication,
  4652. the  type mark must not already impose an index constraint.  Likewise for a
  4653. \vdiscriminant  constraint\v327.,  the  type  mark  must  not  already   impose   a
  4654. \vdiscriminant\v305. constraint.
  4655. The \velaboration\v333. of a subtype declaration consists of the elaboration of the
  4656. subtype  indication.   The  elaboration  of  a subtype indication creates a
  4657. subtype.  If the subtype indication does  not  include  a  constraint,  the
  4658. subtype is the same as that denoted by the type mark.  The elaboration of a
  4659. subtype indication that includes a constraint proceeds as follows:
  4660. (a)  The constraint is first elaborated.
  4661. (b)  A check is then made that the constraint is compatible with  the  type
  4662.      or subtype denoted by the type mark.
  4663. The  condition  imposed  by  a  constraint  is the condition obtained after
  4664. elaboration of the constraint.  (The rules of  constraint  elaboration  are
  4665. such  that  the \vexpressions\v410. and  ranges of constraints are evaluated by the
  4666. elaboration of these constraints.)  The rules  defining  compatibility  are
  4667. given  for each form of constraint in the appropriate section.  These rules
  4668. are such that if a constraint  is  compatible  with  a  subtype,  then  the
  4669. condition imposed by the constraint cannot contradict any condition already
  4670. imposed  by  the  subtype on its values.  The exception \vCONSTRAINT_ERROR\v1100. is
  4671. raised if any check of compatibility fails.
  4672. Examples of subtype declarations:
  4673.     \usubtype\n RAINBOW   \uis\n COLOR \urange\n RED .. BLUE;        --  see 3.3.1
  4674.     \usubtype\n RED_BLUE  \uis\n RAINBOW;
  4675.     \usubtype\n INT       \uis\n INTEGER;
  4676.     \usubtype\n SMALL_INT \uis\n INTEGER \urange\n -10 .. 10;
  4677.     \usubtype\n UP_TO_K   \uis\n COLUMN \urange\n 1 .. K;            --  see 3.3.1
  4678.     \usubtype\n SQUARE    \uis\n MATRIX(1 .. 10, 1 .. 10);       --  see 3.6
  4679.     \usubtype\n MALE      \uis\n PERSON(SEX => M);               --  see 3.8
  4680. Note:
  4681. A subtype declaration does not define a new type.
  4682. 3.3.3    \uClassification of Operations\n
  4683. The   set  of  operations  of  a  \vtype\v305.  includes  the  explicitly  declared
  4684. \vsubprograms\v600. that have a parameter or result of the type;  such  subprograms
  4685. are necessarily declared after the \vtype declaration\v306..
  4686. The  remaining  operations  are  each  implicitly declared for a given type
  4687. declaration, immediately  after  the  type  definition.   These  implicitly
  4688. declared operations comprise the basic operations, the \vpredefined\v411. \voperators\v411.
  4689. (see  4.5),  and  \venumeration  literals\v311..   In  the  case  of a derived type
  4690. declaration,  the  implicitly  declared  operations  include  any   derived
  4691. subprograms.    The   operations  implicitly  declared  for  a  given  type
  4692. declaration occur after the type declaration and before the  next  explicit
  4693. declaration,  if  any.   The  implicit  declarations of \vderived\v309. \vsubprograms\v309.
  4694. occur last.
  4695. A basic operation is an operation that is inherent in one of the following:
  4696.   -  An \vassignment\v502.  (in  assignment  statements  and  initializations),  an
  4697.      \vallocator\v421., a \vmembership test\v411., or a \vshort-circuit control form\v411..
  4698.   -  A \vselected component\v404., an \vindexed component\v402., or a \vslice\v403..
  4699.   -  A  qualification  (in  \vqualified  expressions\v420.),   an   explicit   type
  4700.      \vconversion\v419.,  or  an  implicit  type  conversion  of  a  value  of type
  4701.      \vuniversal_integer\v314. or \vuniversal_real\v316.  to  the  corresponding  value  of
  4702.      another \vnumeric type\v310..
  4703.   -  A numeric \vliteral\v406. (for a \vuniversal type\v405.), the  \vliteral\v330.  \unull\n  (for  an
  4704.      access type), a \vstring literal\v208., an \vaggregate\v407., or an \vattribute\v405..
  4705. For every type or \vsubtype\v305. T, the following attribute is defined:
  4706. T'BASE     The base type of T.  This  attribute  is  allowed  only  as  the
  4707.            prefix   of   the  name  of  another  attribute:   for  example,
  4708.            T'BASE'FIRST.
  4709. Note:
  4710. Each literal is an operation  whose  evaluation  yields  the  corresponding
  4711. value  (see  4.2).  Likewise, an aggregate is an operation whose evaluation
  4712. yields a value of a \vcomposite type\v305. (see 4.3).  Some operations  of  a  type
  4713. operate  on  values  of  the  type,  for  example, predefined operators and
  4714. certain subprograms and attributes.  The evaluation of some operations of a
  4715. type returns a value  of  the  type,  for  example,  literals  and  certain
  4716. \vfunctions\v609.,   attributes,   and  predefined  operators.   Assignment  is  an
  4717. operation that operates on an \vobject\v303. and a value.  The  evaluation  of  the
  4718. operation corresponding to a selected component, an indexed component, or a
  4719. slice, yields the object or value denoted by this form of name.
  4720. 3.4      \uDerived Types\n
  4721. A derived type definition defines a new (base) type  whose  characteristics
  4722. are  derived from those of a parent type;  the new type is called a derived
  4723. type.  A derived type definition further defines a derived  \vsubtype\v305.,  which
  4724. is a subtype of the derived \vtype\v305..
  4725.     derived_type_definition ::= \unew\n \vsubtype_indication\v307.
  4726. The  subtype indication that occurs after the \vreserved word\v211. new defines the
  4727. parent subtype.  The parent type is the \vbase type\v305. of  the  parent  subtype.
  4728. If  a \vconstraint\v305. exists for the parent subtype, a similar constraint exists
  4729. for the  derived  subtype;   the  only  difference  is  that  for  a  \vrange\v310.
  4730. \vconstraint\v310.,  and  likewise  for  a  \vfloating\v317. or \vfixed\v319. \vpoint constraint\v319. that
  4731. includes a range constraint, the value of each bound  is  replaced  by  the
  4732. corresponding  value  of  the  derived  type.   The  characteristics of the
  4733. derived type are defined as follows:
  4734.   -  The derived type belongs to the same class  of  types  as  the  parent
  4735.      type.   The  set  of possible values for the derived type is a copy of
  4736.      the set of possible values for the parent type.  If the parent type is
  4737.      composite, then the same components exist for the  derived  type,  and
  4738.      the subtype of corresponding components is the same.
  4739.   -  For each \vbasic operation\v308. of the parent type, there is a  corresponding
  4740.      basic  operation  of  the derived type.  Explicit type conversion of a
  4741.      value of the parent type into the corresponding value of  the  derived
  4742.      type is allowed and vice versa as explained in section 4.6.
  4743.   -  For each \venumeration literal\v311. or \vpredefined\v411. \voperator\v411. of the parent type
  4744.      there is a corresponding operation for the derived type.
  4745.   -  If the parent type is a task type, then for each entry of  the  parent
  4746.      type there is a corresponding entry for the derived type.
  4747.   -  If a \vdefault expression\v303. exists for a component of an object having the
  4748.      parent  type,  then  the  same  default  expression  is  used  for the
  4749.      corresponding component of an object having the derived type.
  4750.   -  If the parent type is an access type, then the parent and the  derived
  4751.      type  share the same \vcollection\v330.;  there is a null \vaccess\v330. \vvalue\v330. for the
  4752.      derived type and it is the \vdefault initial value\v330. of that type.
  4753.   -  If an explicit \vrepresentation clause\v1301. exists for the parent type and if
  4754.      this clause appears before the derived \vtype definition\v306., then there  is
  4755.      a  corresponding  representation  clause  (an  implicit  one)  for the
  4756.      derived type.
  4757.   -  Certain \vsubprograms\v600. that are operations of the parent type are said to
  4758.      be derivable.  For each derivable subprogram of the parent type, there
  4759.      is a corresponding derived subprogram for the derived type.  Two kinds
  4760.      of derivable subprograms exist.  First, if the parent type is declared
  4761.      \vimmediately within\v801. the \vvisible part\v702. of a \vpackage\v700.,  then  a  subprogram
  4762.      that is itself explicitly declared immediately within the visible part
  4763.      becomes  derivable  after  the  end  of  the visible part, if it is an
  4764.      operation of the parent type.   (The  explicit  \vdeclaration\v301.  is  by  a
  4765.      \vsubprogram   declaration\v601.,   a   \vrenaming  declaration\v805.,  or  a  generic
  4766.      instantiation.)  Second, if the parent type is itself a derived  type,
  4767.      then  any  subprogram  that  has  been  derived by this parent type is
  4768.      further derivable, unless the parent type is declared in  the  visible
  4769.      part  of a package and the derived subprogram is hidden by a derivable
  4770.      subprogram of the first kind.
  4771. Each operation of the derived type is implicitly declared at the  place  of
  4772. the  derived  type  declaration.   The \vimplicit declarations\v301. of any derived
  4773. subprograms occur last.
  4774. The specification  of  a  derived  subprogram  is  obtained  implicitly  by
  4775. systematic  replacement  of  the  parent  type  by  the derived type in the
  4776. specification of the derivable subprogram.  Any subtype of the parent  type
  4777. is  likewise  replaced  by  a  subtype  of  the derived type with a similar
  4778. constraint (as for the transformation of a constraint of the parent subtype
  4779. into the corresponding constraint of the derived  subtype).   Finally,  any
  4780. expression  of  the  parent  type  is  made  to  be  the  operand of a type
  4781. \vconversion\v419. that yields a result of the derived type.
  4782. Calling a derived subprogram is equivalent  to  calling  the  corresponding
  4783. subprogram  of  the  parent type, in which each \vactual\v607. \vparameter\v607. that is of
  4784. the derived type is replaced by a type conversion of this actual  parameter
  4785. to the parent type (this means that a conversion to the parent type happens
  4786. before  the  call for the \vmodes\v601. in and in out;  a reverse conversion to the
  4787. derived type happens after the call for the  modes  in  out  and  out,  see
  4788. 6.4.1).   In  addition, if the result of a called function is of the parent
  4789. type, this result is converted to the derived type.
  4790. If a derived or \vprivate type\v704. is declared  immediately  within  the  visible
  4791. part  of  a  package, then, within this visible part, this type must not be
  4792. used as the parent type of a derived type definition.  (For private  types,
  4793. see also section 7.4.1.)
  4794. For the \velaboration\v333. of a derived type definition, the subtype indication is
  4795. first  elaborated,  the  derived  type  is  then  created, and finally, the
  4796. derived subtype is created.
  4797. \uExamples:\n
  4798.     \utype\n LOCAL_COORDINATE \uis new\n COORDINATE;   --  two different types
  4799.     \utype\n MIDWEEK \uis new\n DAY \urange\n TUE .. THU;  --  see 3.5.1
  4800.     \utype\n COUNTER \uis new\n POSITIVE;              --  same range as POSITIVE
  4801.     \utype\n SPECIAL_KEY \uis new\n KEY_MANAGER.KEY;   --  see 7.4.2
  4802.     -- the derived subprograms have the following specifications:
  4803.     -- \uprocedure\n GET_KEY(K : \uout\n SPECIAL_KEY);
  4804.     -- \ufunction\n "<"(X,Y : SPECIAL_KEY) \ureturn\n BOOLEAN;
  4805. \uNotes:\n
  4806. The rules of derivation of basic operations and enumeration literals  imply
  4807. that  the  notation for any \vliteral\v406. or \vaggregate\v407. of the derived type is the
  4808. same as for the parent type;  such literals and aggregates are said  to  be
  4809. overloaded.   Similarly,  it  follows  that  the  notation  for  denoting a
  4810. \vcomponent\v305., a \vdiscriminant\v305., an \ventry\v905., a \vslice\v403., or an \vattribute\v405. is  the  same
  4811. for the derived type as for the parent type.
  4812. Hiding  of a derived subprogram is allowed even within the same \vdeclarative\v801.
  4813. \vregion\v801. (see 8.3).  A derived subprogram hides a  predefined  operator  that
  4814. has the same parameter and result type profile (see 6.6).
  4815. A  \vgeneric  subprogram  declaration\v1201.  is  not  derivable since it declares a
  4816. \vgeneric unit\v1200. rather than a subprogram.  On the other hand, an instantiation
  4817. of a \vgeneric subprogram\v1201. is a (nongeneric) subprogram, which is derivable if
  4818. it satisfies the requirements for derivability of subprograms.
  4819. If the parent type is a \vboolean type\v313., the predefined  relational  operators
  4820. of  the  derived  type deliver a result of the predefined type BOOLEAN (see
  4821. 4.5.2).
  4822. If a representation clause is given for the parent type but  appears  after
  4823. the  derived  type declaration, then no corresponding representation clause
  4824. applies to the derived type;  hence an explicit representation  clause  for
  4825. such a derived type is allowed.
  4826. For  a  derived subprogram, if a parameter belongs to the derived type, the
  4827. subtype of this parameter need not  have  any  value  in  common  with  the
  4828. derived subtype.
  4829. 3.5      \uScalar Types\n
  4830. Scalar  types  comprise  \venumeration  types\v311., integer types, and \vreal types\v316..
  4831. Enumeration types and \vinteger types\v314. are called discrete types;  each  value
  4832. of  a  discrete  type  has  a  position  number  which is an integer value.
  4833. Integer types and real types are called numeric types.   All  scalar  types
  4834. are  ordered,  that  is,  all \vrelational operators\v411. are predefined for their
  4835. values.
  4836.     range_constraint ::=  \urange\n range
  4837.     range ::=  range_attribute
  4838.        | simple_expression .. simple_expression
  4839. A range specifies a subset of values of a scalar type.  The range  L  ..  R
  4840. specifies  the values from L to R inclusive if the relation L <= R is true.
  4841. The values L and R are called the lower bound and upper bound of the range,
  4842. respectively.  A value V is said  to  satisfy  a  range  \vconstraint\v305.  if  it
  4843. belongs  to  the  range;  the value V is said to belong to the range if the
  4844. relations L <= V and V <= R are both TRUE.  A null range  is  a  range  for
  4845. which  the  relation R < L is TRUE;  no value belongs to a null range.  The
  4846. operators <= and < in the above definitions are the predefined operators of
  4847. the scalar type.
  4848. If a range constraint is used in a \vsubtype indication\v307., either  directly  or
  4849. as  part  of  a  \vfloating\v317. or \vfixed point constraint\v319., the type of the simple
  4850. expressions (likewise,  of the bounds of a range  \vattribute\v405.)  must  be  the
  4851. same  as the base type of the \vtype mark\v307. of the subtype indication.  A range
  4852. constraint is compatible with a subtype if each bound of the range  belongs
  4853. to the subtype, or if the range constraint defines a null range;  otherwise
  4854. the range constraint is not compatible with the subtype.
  4855. The  elaboration  of  a  range constraint consists of the \vevaluation\v411. of the
  4856. range.  The evaluation of a range defines its lower  bound  and  its  upper
  4857. bound.   If  \vsimple  expressions\v410.  are  given  to  specify  the  bounds, the
  4858. evaluation of the range evaluates these simple expressions  in  some  order
  4859. that is not defined by the language.
  4860. Attributes
  4861. For  any scalar type T or for any subtype T of a scalar type, the following
  4862. attributes are defined:
  4863. T'FIRST     Yields the lower bound of T.  The value of this  attribute  has
  4864.             the same type as T.
  4865. T'LAST      Yields the upper bound of T.  The value of this  attribute  has
  4866.             the same type as T.
  4867. Note:
  4868. Indexing and iteration rules use values of discrete types.
  4869. More details:
  4870.  3.5.1  \vEnumeration Types\v311.
  4871.  3.5.2  \vCharacter Types\v312.
  4872.  3.5.3  \vBoolean Types\v313.
  4873.  3.5.4  \vInteger Types\v314.
  4874.  3.5.5  \vOperations of Discrete Types\v315.
  4875.  3.5.6  \vReal Types\v316.
  4876.  3.5.7  \vFloating Point Types\v317.
  4877.  3.5.8  \vOperations of Floating Point Types\v318.
  4878.  3.5.9  \vFixed Point Types\v319.
  4879.  3.5.10 \vOperations of fixed point types\v320.
  4880. 3.5.1  Enumeration Types
  4881. An enumeration \vtype definition\v306. defines an enumeration \vtype\v305..
  4882.  enumeration_type_definition ::=
  4883.   (enumeration_literal_specification {, enumeration_literal_specification})
  4884.  enumeration_literal_specification ::=  enumeration_literal
  4885.  enumeration_literal ::=  identifier | character_literal
  4886. The  identifiers  and  \vcharacter  literals\v207.  listed  by  an enumeration type
  4887. definition must be distinct.  Each enumeration literal specification is the
  4888. \vdeclaration\v301. of the corresponding enumeration literal:  this declaration  is
  4889. equivalent  to  the declaration of a parameterless \vfunction\v609., the \vdesignator\v601.
  4890. being the enumeration literal, and the result type  being  the  enumeration
  4891. type.   The  \velaboration\v333.  of  an  enumeration  type  definition  creates an
  4892. enumeration type;  this elaboration  includes  that  of  every  enumeration
  4893. literal specification.
  4894. Each  enumeration  literal  yields  a  different  enumeration  value.   The
  4895. predefined order relations between enumeration values follow the  order  of
  4896. corresponding  \vposition  numbers\v310..   The position number of the value of the
  4897. first listed enumeration literal is zero;  the  position  number  for  each
  4898. other enumeration literal is one more than for its predecessor in the list.
  4899. If  the  same identifier or character literal is specified in more than one
  4900. enumeration type definition, the corresponding  literals  are  said  to  be
  4901. \voverloaded\v610..  At any place where an overloaded enumeration literal occurs in
  4902. the  text  of  a  program,  the  type  of  the  enumeration literal must be
  4903. determinable from the context (see 8.7).
  4904. \uExamples:\n
  4905.   \utype\n DAY    \uis\n (MON, TUE, WED, THU, FRI, SAT, SUN);
  4906.   \utype\n SUIT   \uis\n (CLUBS, DIAMONDS, HEARTS, SPADES);
  4907.   \utype\n GENDER \uis\n (M, F);
  4908.   \utype\n LEVEL  \uis\n (LOW, MEDIUM, URGENT);
  4909.   \utype\n COLOR  \uis\n (WHITE, RED, YELLOW, GREEN, BLUE, BROWN, BLACK);
  4910.   \utype\n LIGHT  \uis\n (RED, AMBER, GREEN); -- RED and GREEN are overloaded
  4911.   \utype\n HEXA   \uis\n ('A', 'B', 'C', 'D', 'E', 'F');
  4912.   \utype\n MIXED  \uis\n ('A', 'B', '*', B, NONE, '?', '%');
  4913.   \subtype\n WEEKDAY \uis\n DAY   \urange\n MON .. FRI;
  4914.   \subtype\n MAJOR   \uis\n SUIT  \urange\n HEARTS .. SPADES;
  4915.   \subtype\n RAINBOW \uis\n COLOR \urange\n RED .. BLUE;  --  the color RED, not the
  4916.                                                    light
  4917. Note:
  4918. If an enumeration literal occurs in  a  context  that  does  not  otherwise
  4919. suffice  to  determine  the  type of the literal, then qualification by the
  4920. \vname\v401. of the enumeration type is one way to resolve the ambiguity (see 8.7).
  4921. 3.5.2    \uCharacter Types\n
  4922. An \venumeration type\v311. is said to be a character \vtype\v305. if at least one  of  its
  4923. enumeration \vliterals\v406. is a \vcharacter literal\v207..  The predefined type CHARACTER
  4924. is  a  character  type  whose  values  are  the 128 characters of the ASCII
  4925. character set.  Each of the 95 \vgraphic characters\v201. of this character set  is
  4926. denoted by the corresponding character literal.
  4927. Example:
  4928.     \utype\n ROMAN_DIGIT \uis\n ('I', 'V', 'X', 'L', 'C', 'D', 'M');
  4929. \uNotes:\n
  4930. The \vpredefined package ASCII\v201. includes the \vdeclaration\v301. of constants denoting
  4931. control  characters  and  of \vconstants\v303. denoting graphic characters that are
  4932. not in the basic character set.
  4933. A conventional character set such as EBCDIC can be declared as a  character
  4934. type;   the  internal  codes  of  the  characters  can  be  specified by an
  4935. enumeration representation clause as explained in section 13.3.
  4936. 3.5.3    \uBoolean Types\n
  4937. There is a predefined enumeration type named BOOLEAN.  It contains the  two
  4938. literals  FALSE and TRUE ordered with the relation FALSE < TRUE.  A boolean
  4939. type is either the type BOOLEAN or a type  that  is  \vderived\v309.,  directly  or
  4940. indirectly, from a boolean \vtype\v305..
  4941. 3.5.4    \uInteger Types\n
  4942. An integer \vtype definition\v306. defines an integer  type  whose  set  of  values
  4943. includes at least those of the specified range.
  4944.     integer_type_definition ::=  \vrange_constraint\v310.
  4945. If  a range constraint is used as an integer type definition, each \vbound of\v310.
  4946. \vthe range\v310. must be defined by a \vstatic expression\v422. of some integer type,  but
  4947. the  two  bounds need not have the same integer type.  (Negative bounds are
  4948. allowed.)
  4949. A type declaration of the form:
  4950.     \utype\n T \uis range\n L .. R;
  4951. is, by definition, equivalent to the following declarations:
  4952.     \utype\n integer_type \uis new\n predefined_integer_type;
  4953.     \usubtype\n T \uis\n integer_type \urange\n integer_type(L) .. integer_type(R);
  4954. where integer_type is an \vanonymous type\v306., and where the  predefined  integer
  4955. type  is  implicitly  selected  by the implementation, so as to contain the
  4956. values L to R inclusive.  The integer \vtype declaration\v306. is illegal  if  none
  4957. of  the  predefined  integer  types  satisfies  this requirement, excepting
  4958. \vuniversal_integer\v401..  The elaboration of the declaration of an  integer  type
  4959. consists   of   the   elaboration   of  the  equivalent  type  and  \vsubtype\v307.
  4960. \vdeclarations\v307..
  4961. The predefined integer types include the type INTEGER.   An  implementation
  4962. may  also  have  predefined  types  such as SHORT_INTEGER and LONG_INTEGER,
  4963. which have (substantially) shorter and longer  ranges,  respectively,  than
  4964. INTEGER.   The  range  of each of these types must be symmetric about zero,
  4965. excepting an extra negative value which may exist in some  implementations.
  4966. The base type of each of these types is the type itself.
  4967. \vInteger  literals\v204.  are the \vliterals\v406. of an anonymous predefined integer type
  4968. that is called universal_integer in this reference manual.   Other  integer
  4969. types  have  no  literals.   However, for each integer type there exists an
  4970. implicit \vconversion\v419.  that  converts  a  universal_integer  value  into  the
  4971. corresponding  value (if any) of the integer type.  The circumstances under
  4972. which these implicit conversions are invoked are described in section  4.6.
  4973. The  position  number of an integer value is the corresponding value of the
  4974. type universal_integer.
  4975. The same arithmetic operators are predefined for  all  integer  types  (see
  4976. 4.5).   The  exception  NUMERIC_ERROR  is  raised  by  the  execution of an
  4977. operation (in particular an implicit conversion) that  cannot  deliver  the
  4978. correct  result  (that  is,  if the value corresponding to the mathematical
  4979. result is not a  value of the integer type).  However, an implementation is
  4980. not required to raise the \vexception NUMERIC_ERROR\v1101. if the operation is  part
  4981. of a larger expression whose result can be computed correctly, as described
  4982. in section 11.6.
  4983. \uExamples:\n
  4984.     \utype\n PAGE_NUM  \uis range\n 1 .. 2_
  4985.     \utype\n LINE_SIZE \uis range\n 1 .. MAX_LINE_SIZE;
  4986.     \usubtype\n SMALL_INT   \uis\n INTEGER   \urange\n -10 .. 10;
  4987.     \usubtype\n COLUMN_PTR  \uis\n LINE_SIZE \urange\n 1 .. 10;
  4988.     \usubtype\n BUFFER_SIZE \uis\n INTEGER   \urange\n 0 .. MAX;
  4989. \uNotes:\n
  4990. The name declared by an integer type declaration is a subtype name.  On the
  4991. other  hand,  the  \vpredefined  operators\v411. of an integer type deliver results
  4992. whose range is defined by the \vparent predefined type\v309.;  such a  result  need
  4993. not  \vbelong to the declared subtype\v305., in which case an attempt to assign the
  4994. result  to  a  variable  of  the  integer  subtype  raises  the   exception
  4995. \vCONSTRAINT_ERROR\v1101..
  4996. The  smallest  (most  negative)  value  supported by the predefined integer
  4997. types of an implementation is  the  named  number  SYSTEM.MIN_INT  and  the
  4998. largest (most positive) value is SYSTEM.MAX_INT (see 13.7).
  4999. 3.5.5    \uOperations of Discrete Types\n
  5000. The basic \voperations\v305. of a discrete type include the operations involved  in
  5001. assignment,  the  \vmembership  tests\v411., and qualification;  for a \vboolean type\v313.
  5002. they include the short-circuit control forms;  for  an  \vinteger  type\v314.  they
  5003. include  the  explicit  \vconversion\v419.  of values of other \vnumeric types\v310. to the
  5004. integer  type,  and  the  implicit  conversion  of  values  of   the   type
  5005. \vuniversal_integer to the type\v314..
  5006. Finally, for every \vdiscrete type\v310. or subtype T, the basic operations include
  5007. the  attributes  listed  below.   In this presentation, T is referred to as
  5008. being  a  subtype  (the  subtype  T)  for  any  property  that  depends  on
  5009. \vconstraints\v305. imposed by T;  other properties are stated in terms of the \vbase\v305.
  5010. \vtype\v305. of T.
  5011. The first group of attributes yield characteristics of the subtype T.  This
  5012. group  includes  the  attribute  BASE (see 3.3.2), the attributes FIRST and
  5013. LAST (see 3.5), the representation attribute SIZE (see  13.7.2),  and   the
  5014. attribute WIDTH defined as follows:
  5015. T'WIDTH     Yields the maximum image length over all values of the  subtype
  5016.             T  (the  image  is  the  sequence of characters returned by the
  5017.             attribute IMAGE, see below).  Yields zero  for  a  null  range.
  5018.             The  value  of this attribute is of the type universal_integer.
  5019. All attributes of the second group are \vfunctions\v609. with a  single  parameter.
  5020. The corresponding actual parameter is indicated below by X.
  5021. T'POS       This attribute is a function.  The parameter X must be a  value
  5022.             of   the  base  type  of  T.   The  result  type  is  the  type
  5023.             universal_integer.  The result is the \vposition  number\v310.  of  the
  5024.             value of the parameter.
  5025. T'VAL       This attribute is a special function with  a  single  parameter
  5026.             which  can be of any integer type.  The result type is the base
  5027.             type of T.  The result is the value whose  position  number  is
  5028.             the  universal_integer value corresponding to X.  The exception
  5029.             \vCONSTRAINT_ERROR\v1101.  is  raised  if  the  universal_integer  value
  5030.             corresponding  to  X is not in the range T'POS(T'BASE'FIRST) ..
  5031.             T'POS(T'BASE'LAST).
  5032. T'SUCC      This attribute is a function.  The parameter X must be a  value
  5033.             of  the base type of T.  The result type is the base type of T.
  5034.             The result is the value whose position number  is  one  greater
  5035.             than  that of X.  The exception CONSTRAINT_ERROR is raised if X
  5036.             equals T'BASE'LAST.
  5037. T'PRED      This attribute is a function.  The parameter X must be a  value
  5038.             of  the base type of T.  The result type is the base type of T.
  5039.             The result is the value whose position number is one less  than
  5040.             that  of  X.   The  \vexception  CONSTRAINT_ERROR\v1101.  is raised if X
  5041.             equals T'BASE'FIRST.
  5042. T'IMAGE     This attribute is a function.  The parameter X must be a  value
  5043.             of  the base type of T.  The result type is the predefined type
  5044.             STRING.  The result is the image of the value of X, that is,  a
  5045.             sequence  of characters representing the value in display form.
  5046.             The image of an integer  value  is  the  corresponding  decimal
  5047.             literal;   without  underlines,  leading  zeros,  exponent,  or
  5048.             trailing spaces;  but with a single leading character  that  is
  5049.             either  a  minus sign or a space.  The lower bound of the image
  5050.             is one.
  5051.             The image of an enumeration value is either  the  corresponding
  5052.             \videntifier\v203. in upper case or the corresponding \vcharacter literal\v207.
  5053.             (including  the two apostrophes);  neither leading nor trailing
  5054.             spaces are included.  The image of a character C, other than  a
  5055.             \vgraphic   character\v201.,   is   implementation-defined;   the  only
  5056.             requirement is that the  image  must  be  such  that  C  equals
  5057.             CHARACTER'VALUE(CHARACTER'IMAGE(C)).
  5058. T'VALUE     This attribute is a function.  The parameter X must be a  value
  5059.             of  the  predefined  type  STRING.  The result type is the base
  5060.             type of T.  Any leading and any trailing spaces of the sequence
  5061.             of characters that corresponds to the parameter are ignored.
  5062.             For an enumeration type, if the sequence of characters has  the
  5063.             syntax of an \venumeration literal\v311. and if this literal exists for
  5064.             the base type of T, the result is the corresponding enumeration
  5065.             value.   For an integer type, if the sequence of characters has
  5066.             the syntax of an  integer  literal,  with  an  optional  single
  5067.             leading character that is a plus or minus sign, and if there is
  5068.             a corresponding value in the base type of T, the result is this
  5069.             value.   In  any  other case, the exception CONSTRAINT_ERROR is
  5070.             raised.
  5071. In addition, the attributes A'SIZE and A'ADDRESS are defined for an  \vobject\v302.
  5072. A of a discrete type (see 13.7.2).
  5073. Besides the \vbasic operations\v308., the operations of a discrete type include the
  5074. predefined relational operators.  For enumeration types, operations include
  5075. enumeration literals.  For boolean types, operations include the predefined
  5076. unary  logical negation \voperator not\v411., and the predefined \vlogical operators\v411..
  5077. For integer types, operations include the predefined arithmetic  operators:
  5078. these  are  the  \vbinary and unary adding operators\v411. - and +, all \vmultiplying\v411.
  5079. \voperators\v411., the unary \voperator abs\v411., and the \vexponentiating operator\v411..
  5080. The operations of a subtype are the corresponding operations  of  its  base
  5081. type   except   for   the   following:    \vassignment\v502.,   membership   tests,
  5082. qualification, explicit type \vconversions\v419., and the \vattributes\v405. of  the  first
  5083. group;   the  effect  of  each  of  these operations depends on the subtype
  5084. (assignments, membership tests, qualifications, and conversions  involve  a
  5085. subtype check;  attributes of the first group yield a characteristic of the
  5086. subtype).
  5087. \uNotes:\n
  5088. For  a  subtype of a discrete type, the results delivered by the attributes
  5089. SUCC, PRED, VAL, and VALUE need not belong to the subtype;  similarly,  the
  5090. actual  parameters  of  the  attributes POS, SUCC, PRED, and IMAGE need not
  5091. belong to the subtype.  The  following  relations  are  satisfied  (in  the
  5092. absence of an exception) by these attributes:
  5093.     T'POS(T'SUCC(X)) = T'POS(X) + 1
  5094.     T'POS(T'PRED(X)) = T'POS(X) - 1
  5095.     T'VAL(T'POS(X))  = X
  5096.     T'POS(T'VAL(N))  = N
  5097. \uExamples:\n
  5098.     --  For the types and subtypes declared in section 3.5.1 we have:
  5099.     --  COLOR'FIRST   = WHITE,   COLOR'LAST   = BLACK
  5100.     --  RAINBOW'FIRST = RED,     RAINBOW'LAST = BLUE
  5101.     --  COLOR'SUCC(BLUE) = RAINBOW'SUCC(BLUE) = BROWN
  5102.     --  COLOR'POS(BLUE)  = RAINBOW'POS(BLUE)  = 4
  5103.     --  COLOR'VAL(0)     = RAINBOW'VAL(0)     = WHITE
  5104. 3.5.6    \uReal Types\n
  5105. Real \vtypes\v305. provide approximations to the real numbers, with relative bounds
  5106. on  errors  for  floating  point  types, and with absolute bounds for fixed
  5107. point types.
  5108.     real_type_definition ::=
  5109.        \vfloating_point_constraint\v317. | fixed_point_constraint
  5110. A set of numbers called model numbers is associated with  each  real  type.
  5111. Error  bounds  on the \vpredefined operations\v308. are given in terms of the model
  5112. numbers.  An implementation of the type must include at least  these  model
  5113. numbers and represent them exactly.
  5114. An  implementation-dependent  set  of  numbers, called the safe numbers, is
  5115. also associated with each real type.  The set of safe  numbers  of  a  real
  5116. type must include at least the set of model numbers of the type.  The range
  5117. of  safe  numbers  is allowed to be larger than the range of model numbers,
  5118. but error bounds on the predefined operations for safe numbers are given by
  5119. the same rules as  for  model  numbers.   Safe  numbers  therefore  provide
  5120. guaranteed error bounds for operations on an implementation-dependent range
  5121. of  numbers;   in  contrast, the range of model numbers depends only on the
  5122. real \vtype definition\v306. and is therefore independent of the implementation.
  5123. Real \vliterals\v204. are the \vliterals\v406. of an anonymous predefined real type that is
  5124. called universal_real in this reference manual.  Other real types  have  no
  5125. literals.  However, for each real type, there exists an implicit \vconversion\v419.
  5126. that  converts  a  universal_real value into a value of the real type.  The
  5127. conditions under which these implicit conversions are invoked are described
  5128. in section 4.6.   If  the  universal_real  value  is  a  safe  number,  the
  5129. implicit conversion delivers the corresponding value;  if it belongs to the
  5130. range  of  safe  numbers but is not a safe number, then the converted value
  5131. can be any value within the range defined by the safe  numbers  next  above
  5132. and below the universal_real value.
  5133. The  execution of an operation that yields a value of a real type may raise
  5134. the \vexception NUMERIC_ERROR\v1101., as explained in section 4.5.7,  if  it  cannot
  5135. deliver a correct result (that is, if the value corresponding to one of the
  5136. possible  mathematical  results  does  not  belong  to  the  range  of safe
  5137. numbers);  in particular, this exception  can  be  raised  by  an  implicit
  5138. conversion.   However,  an  implementation  is  not  required  to raise the
  5139. exception NUMERIC_ERROR if the operation is part  of  a  larger  expression
  5140. whose result can be computed correctly (see 11.6).
  5141. The  \velaboration\v333.  of a real type definition includes the elaboration of the
  5142. floating or \vfixed point constraint\v319. and creates a real type.
  5143. Note:
  5144. An algorithm written to rely only upon  the  minimum  numerical  properties
  5145. guaranteed  by  the  type  definition  for  model  numbers will be portable
  5146. without further precautions.
  5147. 3.5.7    \uFloating Point Types\n
  5148. For  floating  point  \vtypes\v305.,  the  \verror  bound\v316.  is specified as a relative
  5149. precision by giving the required  minimum  number  of  significant  decimal
  5150. digits.
  5151.     floating_point_constraint ::=
  5152.        floating_accuracy_definition [range_constraint]
  5153.     floating_accuracy_definition ::=  \udigits\n static_simple_expression
  5154. The  minimum number of significant decimal digits is specified by the value
  5155. of the static \vsimple expression\v410. of the floating accuracy definition.   This
  5156. value  must belong to some \vinteger type\v314. and must be positive (nonzero);  it
  5157. is denoted by D in the remainder of this section.  If  the  floating  point
  5158. constraint  is  used  as  a  real  type  definition  and  includes  a range
  5159. constraint, then each \vbound of the  range\v310.  must  be  defined  by  a \vstatic\v422.
  5160. \vexpression\v422.  of  some  real  type, but the two bounds need not have the same
  5161. \vreal type\v316..
  5162. For a given radix, the following canonical form is defined for any floating
  5163. point \vmodel number\v316. other than zero:
  5164.     sign * mantissa * (radix ** \vexponent\v205.)
  5165. In this form: sign is either +1 or -1;  mantissa is expressed in  a  number
  5166. base  given by radix; and exponent is an integer number (possibly negative)
  5167. such that the integer part of mantissa is zero and the first digit  of  its
  5168. fractional part is not a zero.
  5169. The  specified  number  D  is the minimum number of decimal digits required
  5170. after the point in the decimal mantissa (that is, if radix  is  ten).   The
  5171. value  of D in turn determines a corresponding number B that is the minimum
  5172. number of binary digits required after the point  in  the  binary  mantissa
  5173. (that is, if radix is two).  The number B associated with D is the smallest
  5174. value  such  that the relative precision of the binary form is no less than
  5175. that specified for the decimal form.  (The number B  is  the  integer  next
  5176. above (D*log(10)/log(2)) + 1.)
  5177. The  model  numbers defined by a floating accuracy definition comprise zero
  5178. and all numbers whose binary canonical form has exactly B digits after  the
  5179. point  in  the  mantissa  and  an  exponent in the range -4*B .. +4*B.  The
  5180. guaranteed minimum accuracy of \voperations\v305.  of  a  floating  point  type  is
  5181. defined in terms of the model numbers of the floating point constraint that
  5182. forms the corresponding \vreal type definition\v316. (see 4.5.7).
  5183. The   predefined   floating   point  types  include  the  type  FLOAT.   An
  5184. implementation may also have  predefined  types  such  as  SHORT_FLOAT  and
  5185. LONG_FLOAT,   which   have   (substantially)   less   and   more  accuracy,
  5186. respectively, than FLOAT.  The base type of each predefined floating  point
  5187. type  is  the  type  itself.  The model numbers of each predefined floating
  5188. point type are defined in terms of the number D of decimal digits  returned
  5189. by the attribute DIGITS (see 3.5.8).
  5190. For  each  predefined  floating point type (consequently also for each \vtype\v309.
  5191. \vderived\v309. therefrom), a set of \vsafe numbers\v316. is defined as follows.  The  safe
  5192. numbers  have  the same number B of mantissa \vdigits\v201. as the model numbers of
  5193. the type  and  have  an  exponent  in  the  range  -E  ..  +E  where  E  is
  5194. implementation-defined  and  at  least  equal  to the 4*B of model numbers.
  5195. (Consequently, the safe numbers include  the  model  numbers.)   The  rules
  5196. defining  the  accuracy of operations with model and safe numbers are given
  5197. in section 4.5.7.  The safe numbers of a subtype  are  those  of  its  base
  5198. type.
  5199. A floating point \vtype declaration\v306. of one of the two forms (that is, with or
  5200. without the optional range constraint indicated by the square brackets):
  5201.     \utype\n T \uis digits\n D [\urange\n L .. R];
  5202. is, by definition, equivalent to the following declarations:
  5203.     \utype\n floating_point_type \uis new\n predefined_floating_point_type;
  5204.     \usubtype\n T \uis\n floating_point_type \udigits\n D
  5205.        [\urange\n floating_point_type(L) .. floating_point_type(R)];
  5206. where  floating_point_type  is  an \vanonymous type\v306., and where the predefined
  5207. floating point type is implicitly selected by the  implementation  so  that
  5208. its  model numbers include the model numbers defined by D;  furthermore, if
  5209. a range L .. R is supplied, then both L and R must belong to the  range  of
  5210. safe  numbers.   The  floating  point declaration is illegal if none of the
  5211. predefined floating point types  satisfies  these  requirements,  excepting
  5212. universal_real.   The  maximum  number of digits that can be specified in a
  5213. floating accuracy definition is given by the system-dependent named  number
  5214. SYSTEM.MAX_DIGITS (see 13.7.1).
  5215. The  \velaboration\v301.  of  a  floating  point  type  declaration consists of the
  5216. elaboration of the equivalent type and \vsubtype declarations\v307..
  5217. If a floating point constraint follows a \vtype mark\v307. in a \vsubtype indication\v307.,
  5218. the type mark must denote a floating point type or \vsubtype\v305..   The  floating
  5219. point  constraint  is  \vcompatible\v307.  with  the type mark only if the number D
  5220. specified in the floating accuracy  definition  is  not  greater  than  the
  5221. corresponding  number  D  for the type or subtype denoted by the type mark.
  5222. Furthermore, if the floating point constraint includes a range  constraint,
  5223. the  floating point constraint is compatible with the type mark only if the
  5224. range constraint is, itself, compatible with the type mark.
  5225. The elaboration of such a subtype indication includes  the  elaboration  of
  5226. the range constraint, if there is one;  it creates a floating point subtype
  5227. whose  model  numbers  are  defined  by the corresponding floating accuracy
  5228. definition.  A value of a floating point type belongs to a  floating  point
  5229. subtype if and only if it \vbelongs to the range defined by the subtype\v305..
  5230. The  same  \varithmetic operators\v315. are predefined for all floating point types
  5231. (see 4.5).
  5232. \uNotes:\n
  5233. A range constraint is allowed  in  a  floating  point  subtype  indication,
  5234. either  directly  after  the  type  mark,  or  as  part of a floating point
  5235. constraint.  In either case the bounds of the range must belong to the base
  5236. type of the type mark (see  3.5).   The  imposition  of  a  floating  point
  5237. constraint on a type mark in a subtype indication cannot reduce the allowed
  5238. range  of  values unless it includes a range constraint (the range of model
  5239. numbers that correspond to the specified number of digits  can  be  smaller
  5240. than  the  range  of  numbers of the type mark).  A value that belongs to a
  5241. floating point subtype need not be a model number of the subtype.
  5242. \uExamples:\n
  5243.     \utype\n COEFFICIENT \uis digits\n 10 range -1.0 .. 1.0;
  5244.     \utype\n REAL \uis digits\n 8;
  5245.     \utype\n MASS \uis digits\n 7 \urange\n 0.0 .. 1.0E35;
  5246.     \usubtype\n SHORT_COEFF \uis\n COEFFICIENT \udigits\n 5;
  5247.                                          --  a subtype with less accuracy
  5248.     \usubtype\n PROBABILITY \uis\n REAL \urange\n 0.0 .. 1.0;
  5249.                                          --  a subtype with a smaller range
  5250. Notes on the examples:
  5251. The implemented accuracy for COEFFICIENT  is  that  of  a  predefined  type
  5252. having  at least 10 digits of precision.  Consequently the specification of
  5253. 5 digits of precision for the subtype SHORT_COEFF is allowed.  The  largest
  5254. model number for the type MASS is approximately 1.27E30 and hence less than
  5255. the  specified  upper bound (1.0E35).  Consequently the declaration of this
  5256. type is legal only if this upper bound is in the range of the safe  numbers
  5257. of  a predefined floating point type having at least 7 digits of precision.
  5258. 3.5.8    \uOperations of Floating Point Types\n
  5259. The  \vbasic  operations\v308.  of  a  \vfloating  point  type\v317. include the \voperations\v305.
  5260. involved in  \vassignment\v502.,  \vmembership  tests\v411.,  qualification,  the  explicit
  5261. \vconversion\v419. of values of other \vnumeric types\v310. to the floating point \vtype\v305., and
  5262. the  implicit  conversion of values of the type \vuniversal_real\v316. to the type.
  5263. In addition, for  every  floating  point  type  or  \vsubtype\v305.  T,  the  basic
  5264. operations include the \vattributes\v405. listed below.  In this presentation, T is
  5265. referred  to  as  being  a  subtype  (the  subtype T) for any property that
  5266. depends on \vconstraints\v305. imposed by T;  other properties are stated in  terms
  5267. of the \vbase type\v305. of T.
  5268. The  first group of attributes yield characteristics of the subtype T.  The
  5269. attributes of this group are the attribute BASE (see 3.3.2), the attributes
  5270. FIRST and LAST (see 3.5), the representation attribute SIZE  (see  13.7.2),
  5271. and the following attributes:
  5272. T'DIGITS     Yields the number of decimal \vdigits\v201. in the decimal mantissa of
  5273.              \vmodel  numbers\v316.  of  the subtype T.  (This attribute yields the
  5274.              number D of section 3.5.7.)  The value of this attribute is of
  5275.              the \vtype universal_integer\v314..
  5276. T'MANTISSA   Yields the number of binary digits in the binary  mantissa  of
  5277.              model  numbers  of  the subtype T.  (This attribute yields the
  5278.              number B of section 3.5.7.)  The value of this attribute is of
  5279.              the type universal_integer.
  5280. T'EPSILON    Yields the absolute value of the difference between the  model
  5281.              number 1.0 and the next model number above, for the subtype T.
  5282.              The value of this attribute is of the type universal_real.
  5283. T'EMAX       Yields the largest exponent value in the binary canonical form
  5284.              of model numbers of the subtype T.  (This attribute yields the
  5285.              product 4*B of section 3.5.7.)  The value of this attribute is
  5286.              of the type  universal_integer.
  5287. T'SMALL      Yields the smallest positive (nonzero)  model  number  of  the
  5288.              subtype  T.   The  value  of  this  attribute  is  of the type
  5289.              universal_real.
  5290. T'LARGE      Yields the largest positive model number  of  the  subtype  T.
  5291.              The value of this attribute is of the type universal_real.
  5292. The  attributes  of the second group include the following attributes which
  5293. yield characteristics of the safe numbers:
  5294. T'SAFE_EMAX  Yields the largest exponent value in the binary canonical form
  5295.              of safe numbers of the base type of T.  (This attribute yields
  5296.              the number E of section 3.5.7.)  The value of  this  attribute
  5297.              is of the type universal_integer.
  5298. T'SAFE_SMALL Yields the smallest positive (nonzero) safe number of the base
  5299.              type  of  T.   The  value  of  this  attribute  is of the type
  5300.              universal_real.
  5301. T'SAFE_LARGE Yields the largest positive safe number of the base type of T.
  5302.              The value of this attribute is of the type universal_real.
  5303. In addition, the attributes A'SIZE and A'ADDRESS are defined for an  \vobject\v302.
  5304. A  of a floating point type (see 13.7.2).  Finally, for each floating point
  5305. type there are machine-dependent attributes that are not related  to  model
  5306. numbers  and  safe  numbers.   They correspond to the attribute designators
  5307. MACHINE_RADIX,      MACHINE_MANTISSA,      MACHINE_EMAX,      MACHINE_EMIN,
  5308. MACHINE_ROUNDS, and MACHINE_OVERFLOWS (see 13.7.3).
  5309. Besides  the  basic  operations,  the  operations  of a floating point type
  5310. include the \vrelational operators\v411., and the following  predefined  \varithmetic\v315.
  5311. \voperators\v315.:   the binary and \vunary adding operators\v411. - and +, the \vmultiplying\v411.
  5312. operators * and /, the unary \voperator abs\v411., and the \vexponentiating\v411. \voperator\v411..
  5313. The operations of a subtype are the corresponding operations  of  the  type
  5314. except  for  the  following:   assignment, membership tests, qualification,
  5315. explicit conversion, and the attributes of the first group;  the effects of
  5316. these operations are redefined in terms of the subtype.
  5317. \uNotes:\n
  5318. The  attributes  EMAX,  SMALL,  LARGE,  and  EPSILON   are   provided   for
  5319. convenience.   They  are all related to MANTISSA by the following formulas:
  5320.     T'EMAX    = 4*T'MANTISSA
  5321.     T'EPSILON = 2.0**(1 - T'MANTISSA)
  5322.     T'SMALL   = 2.0**(-T'EMAX - 1)
  5323.     T'LARGE   = 2.0**T'EMAX * (1.0 - 2.0**(-T'MANTISSA))
  5324. The attribute MANTISSA, giving the number of binary digits in the mantissa,
  5325. is itself related to DIGITS.  The  following  relations  hold  between  the
  5326. characteristics of the model numbers and those of the \vsafe numbers\v311.:
  5327.     T'BASE'EMAX  <= T'SAFE_EMAX
  5328.     T'BASE'SMALL >= T'SAFE_SMALL
  5329.     T'BASE'LARGE <= T'SAFE_LARGE
  5330. The attributes T'FIRST and T'LAST need not yield model or safe numbers.  If
  5331. a  certain  number  of  digits is specified in the declaration of a type or
  5332. subtype T, the attribute T'DIGITS yields this number.
  5333. 3.5.9    \uFixed Point Types\n
  5334. For fixed point types, the \verror bound\v316. is specified as an  absolute  value,
  5335. called the delta of the fixed point \vtype\v305..
  5336.     fixed_point_constraint ::=
  5337.        fixed_accuracy_definition [range_constraint]
  5338.     fixed_accuracy_definition ::=  \udelta\n static_simple_expression
  5339. The  \udelta\n is specified by the value of the static \vsimple expression\v410. of the
  5340. fixed accuracy definition.  This value must belong to some  real  type  and
  5341. must  be  positive  (nonzero).   If the fixed point constraint is used as a
  5342. \vreal type\v316. definition, then it must include a range constraint;  each  bound
  5343. of  the specified range must be defined by a \vstatic expression\v422. of some real
  5344. type but the two bounds need not have the same real  type.   If  the  fixed
  5345. point  constraint  is used in a \vsubtype indication\v307., the range constraint is
  5346. optional.
  5347. A canonical form is defined for any fixed point  \vmodel  number\v316.  other  than
  5348. zero.   In  this  form:   sign  is either +1 or -1;  mantissa is a positive
  5349. (nonzero) integer;  and any  model  number  is  a  multiple  of  a  certain
  5350. positive real number called small, as follows:
  5351.     sign * mantissa * small
  5352. For the model numbers defined by a fixed point constraint, the number small
  5353. is chosen as the largest power of two that is not greater than the delta of
  5354. the  fixed  accuracy  definition.  Alternatively, it is possible to specify
  5355. the value of small by a \vlength clause\v1302.  (see  13.2),  in  which  case  model
  5356. numbers  are  multiples  of  the  specified  value.  The guaranteed minimum
  5357. accuracy of \voperations\v305. of a fixed point type is defined  in  terms  of the
  5358. model  numbers  of  the fixed point constraint that forms the corresponding
  5359. real type definition (see 4.5.7).
  5360. For a fixed point constraint that includes a range  constraint,  the  model
  5361. numbers  comprise  zero  and  all  multiples of small whose mantissa can be
  5362. expressed using exactly B binary digits, where the value of B is chosen  as
  5363. the  smallest integer number for which each \vbound of the specified range\v310. is
  5364. either a model number or lies at most small distant from  a  model  number.
  5365. For a fixed point constraint that does not include a range constraint (this
  5366. is  only  allowed  after  a  \vtype mark\v307., in a subtype indication), the model
  5367. numbers are defined by the delta of the fixed accuracy  definition  and  by
  5368. the range of the subtype denoted by the type mark.
  5369. An  implementation  must have at least one anonymous predefined fixed point
  5370. type.  The \vbase type\v305. of each such fixed point type is the type itself.  The
  5371. model numbers of each predefined fixed point type  comprise  zero  and  all
  5372. numbers for which mantissa (in the canonical form) has the number of binary
  5373. digits  returned  by the attribute MANTISSA, and for which the number small
  5374. has the value returned by the attribute SMALL.
  5375. A fixed point \vtype declaration\v306. of the form:
  5376.     \utype\n T \uis delta\n D \urange\n L .. R;
  5377. is, by definition, equivalent to the following declarations:
  5378.     \utype\n fixed_point_type \uis new\n predefined_fixed_point_type;
  5379.     \usubtype\n T \uis\n fixed_point_type
  5380.        \urange\n fixed_point_type(L) .. fixed_point_type(R);
  5381. In these declarations, fixed_point_type  is  an  \vanonymous  type\v306.,  and  the
  5382. predefined fixed point type is implicitly selected by the implementation so
  5383. that its model numbers include the model numbers defined by the fixed point
  5384. constraint  (that  is,  by  D,  L,  and  R, and possibly by a length clause
  5385. specifying small).
  5386. The fixed point declaration is illegal  if  no  predefined  type  satisfies
  5387. these  requirements.   The \vsafe numbers\v316. of a fixed point type are the model
  5388. numbers of its base type.
  5389. The  \velaboration\v333.  of  a  fixed  point  type  declaration  consists  of  the
  5390. elaboration of the equivalent type and \vsubtype declarations\v307..
  5391. If  the fixed point constraint follows a type mark in a subtype indication,
  5392. the type mark must denote a fixed point type or subtype.  The  fixed  point
  5393. constraint  is \vcompatible\v307. with the type mark only if the delta specified by
  5394. the fixed accuracy definition is not smaller than the delta for the type or
  5395. subtype denoted  by  the  type  mark.   Furthermore,  if  the  fixed  point
  5396. constraint  includes  a  range  constraint,  the  fixed point constraint is
  5397. compatible with the type mark only if  the  range  constraint  is,  itself,
  5398. compatible with the type mark.
  5399. The  elaboration  of  such a subtype indication includes the elaboration of
  5400. the range constraint, if there is one;  it creates a  fixed  point  subtype
  5401. whose model numbers are defined by the corresponding fixed point constraint
  5402. and  also  by the length clause specifying small, if there is one.  A value
  5403. of a fixed point type \vbelongs to a fixed point subtype\v305. if and  only  if  it
  5404. belongs to the range defined by the subtype.
  5405. The same \varithmetic operators\v310. are predefined for all fixed point types (see
  5406. 4.5).  Multiplication and division of fixed point values deliver results of
  5407. an  anonymous predefined fixed point type that is called universal_fixed in
  5408. this reference manual;  the accuracy of this type is arbitrarily fine.  The
  5409. values of this type must be converted explicitly to some \vnumeric type\v310..
  5410. \uNotes:\n
  5411. If S is a subtype of a fixed point type or subtype T, then the set of model
  5412. numbers of S is a subset of those of T.  If a length clause has been  given
  5413. for  T,  then both S and T have the same value for small.  Otherwise, since
  5414. small is a power of two, the small  of  S  is  equal  to  the  small  of  T
  5415. multiplied by a nonnegative power of two.
  5416. A  range  constraint is allowed in a fixed point subtype indication, either
  5417. directly after the type mark, or as part of a fixed point  constraint.   In
  5418. either  case  the  bounds  of the range must belong to the base type of the
  5419. type mark (see 3.5).
  5420. \uExamples:\n
  5421.     \utype\n VOLT \uis delta\n 0.125 \urange\n 0.0 .. 255.0;
  5422.     \usubtype\n ROUGH_VOLTAGE \uis\n VOLT \udelta\n 1.0;  --  same range as VOLT
  5423.     --  A pure fraction which requires all the available space in a word
  5424.     --  on a two's complement machine can be declared as the type FRACTION:
  5425.     DEL : \uconstant\n := 1.0/2**(WORD_LENGTH - 1);
  5426.     \utype\n FRACTION \uis delta\n DEL \urange\n -1.0 .. 1.0 - DEL;
  5427. 3.5.10   \uOperations of Fixed Point Types\n
  5428. The \vbasic operations\v308. of a \vfixed point type\v319. include the \voperations\v305. involved
  5429. in  \vassignment\v502., \vmembership tests\v411., qualification, the explicit \vconversion\v419. of
  5430. values of other \vnumeric types\v310. to the fixed point  type,  and  the  implicit
  5431. conversion of values of the type \vuniversal_real\v316. to the type.
  5432. In  addition,  for every fixed point type or \vsubtype\v305. T the basic operations
  5433. include the attributes listed below.  In this presentation T is referred to
  5434. as being a subtype (the  subtype  T)  for  any  property  that  depends  on
  5435. constraints imposed by T;  other properties are stated in terms of the base
  5436. type of T.
  5437. The  first group of attributes yield characteristics of the subtype T.  The
  5438. attributes  of  this  group  are  the  attributes  BASE  (see  3.3.2),  the
  5439. attributes FIRST and LAST (see 3.5), the representation attribute SIZE (see
  5440. 13.7.2) and the following attributes:
  5441. T'DELTA      Yields the value of the \vdelta\v319. specified in the fixed  accuracy
  5442.              definition  for the subtype T.  The value of this attribute is
  5443.              of the type universal_real.
  5444. T'MANTISSA   Yields the number of binary digits in the  mantissa  of  model
  5445.              numbers of the subtype T.  (This attribute yields the number B
  5446.              of section 3.5.9.)  The value of this attribute is of the type
  5447.              \vuniversal_integer\v314..
  5448. T'SMALL      Yields the smallest positive (nonzero)  \vmodel  number\v316.  of  the
  5449.              subtype  T.   The  value  of  this  attribute  is  of the type
  5450.              universal_real.
  5451. T'LARGE      Yields the largest positive model number  of  the  subtype  T.
  5452.              The value of this attribute is of the type universal_real.
  5453. T'FORE       Yields the minimum number of characters needed for the integer
  5454.              part of the decimal representation of any value of the subtype
  5455.              T,  assuming  that  the  representation  does  not  include an
  5456.              exponent, but includes a one-character prefix that is either a
  5457.              minus sign or a space.  (This minimum number does not  include
  5458.              superfluous  zeros  or  underlines, and is at least two.)  The
  5459.              value of this attribute is of the type universal_integer.
  5460. T'AFT        Yields the number of decimal digits needed after the point  to
  5461.              accommodate  the  precision of the subtype T, unless the delta
  5462.              of the subtype T is  greater  than  0.1,  in  which  case  the
  5463.              attribute  yields  the  value  one.   (T'AFT  is  the smallest
  5464.              positive integer N for which (10**N)*T'DELTA is  greater  than
  5465.              or  equal to one.)  The value of this attribute is of the type
  5466.              universal_integer.
  5467. The attributes of the second group include the following  attributes  which
  5468. yield characteristics of the \vsafe numbers\v316.:
  5469. T'SAFE_SMALL Yields the smallest positive (nonzero) safe number of the base
  5470.              type  of  T.   The  value  of  this  attribute  is of the type
  5471.              universal_real.
  5472. T'SAFE_LARGE Yields the largest positive safe number of the \vbase type\v305. of T.
  5473.              The value of this attribute is of the type universal_real.
  5474. In addition, the attributes A'SIZE and A'ADDRESS are defined for an  \vobject\v302.
  5475. A  of  a fixed point type (see 13.7.2).  Finally, for each fixed point type
  5476. or subtype T, there are the machine-dependent  attributes  T'MACHINE_ROUNDS
  5477. and T'MACHINE_OVERFLOWS (see 13.7.3).
  5478. Besides  the basic operations, the operations of a fixed point type include
  5479. the  \vrelational  operators\v411.,  and  the   following   predefined   \varithmetic\v315.
  5480. \voperators\v315.:   the binary and unary \vadding operators\v411. - and +, the \vmultiplying\v411.
  5481. operators * and /, and the operator \uabs\n.
  5482. The operations of a subtype are the corresponding operations  of  the  type
  5483. except  for  the  following:   assignment, membership tests, qualification,
  5484. explicit conversion, and the attributes of the first group;  the effects of
  5485. these operations are redefined in terms of the subtype.
  5486. \uNotes:\n
  5487. The value of the attribute T'FORE depends only on the range of the  subtype
  5488. T.   The value of the attribute T'AFT depends only on the value of T'DELTA.
  5489. The following relations exist between attributes of a fixed point type:
  5490.     T'LARGE      = (2**T'MANTISSA - 1) * T'SMALL
  5491.     T'SAFE_LARGE = T'BASE'LARGE
  5492.     T'SAFE_SMALL = T'BASE'SMALL
  5493. 3.6      \uArray Types\n
  5494. An array object is a composite object consisting of  \vcomponents\v305.  that  have
  5495. the  same  subtype.   The \vname\v401. for a component of an array uses one or more
  5496. index values belonging to specified \vdiscrete types\v310..  The value of an  array
  5497. \vobject\v302. is a composite value consisting of the values of its components.
  5498.     array_type_definition ::=
  5499.        unconstrained_array_definition | constrained_array_definition
  5500.     unconstrained_array_definition ::=
  5501.        \uarray\n(index_subtype_definition {, index_subtype_definition}) \uof\n
  5502.                 component_subtype_indication
  5503.     constrained_array_definition ::=
  5504.        \uarray\n index_constraint \uof\n component_subtype_indication
  5505.     index_subtype_definition ::= type_mark \urange\n <>
  5506.     index_constraint ::=  (discrete_range {, discrete_range})
  5507.     discrete_range ::= discrete_subtype_indication | \urange\n
  5508. An   array   object   is  characterized  by  the  number  of  indices  (the
  5509. dimensionality of the array), the type and  position  of  each  index,  the
  5510. lower and upper bounds for each index, and the type and possible \vconstraint\v305.
  5511. of the components.  The order of the indices is significant.
  5512. A  one-dimensional  array  has a distinct component for each possible index
  5513. value.  A multidimensional array has a distinct component for each possible
  5514. sequence of index values that can be formed by  selecting   one  value  for
  5515. each  index position (in the given order).  The possible values for a given
  5516. index are all the values between the lower  and  upper  bounds,  inclusive;
  5517. this \vrange\v305. of values is called the index range.
  5518. An  unconstrained  array definition defines an array type.  For each object
  5519. that has the array type, the number of indices, the type  and  position  of
  5520. each  index,  and  the  subtype  of  the  components  are  as  in  the type
  5521. definition;  the values of the lower and upper bounds for each index belong
  5522. to the corresponding index subtype, except for null arrays as explained  in
  5523. section  3.6.1.   The  index  subtype  for  a  given  index position is, by
  5524. definition, the subtype denoted by the \vtype mark\v307. of the corresponding index
  5525. subtype definition.  The compound delimiter <> (called a box) of  an  index
  5526. subtype  definition stands for an undefined range (different objects of the
  5527. type need not have the same bounds).  The \velaboration\v301. of  an  unconstrained
  5528. array  definition creates an array type;  this elaboration includes that of
  5529. the component subtype indication.
  5530. A constrained array definition defines both an array type and a subtype  of
  5531. this type:
  5532.   -  The array type is an implicitly declared \vanonymous type\v306.;  this type is
  5533.      defined  by an (implicit) unconstrained array definition, in which the
  5534.      component  subtype  indication  is  that  of  the  constrained   array
  5535.      definition,  and  in  which  the  type  mark  of  each  index  subtype
  5536.      definition denotes the subtype defined by the  corresponding  discrete
  5537.      range.
  5538.   -  The array subtype is the subtype obtained by imposition of  the  index
  5539.      constraint on the array type.
  5540. If  a  constrained  array  definition  is given for a \vtype declaration\v306., the
  5541. simple name declared by this declaration denotes the array subtype.
  5542. The elaboration of a constrained array definition creates the corresponding
  5543. array type and array subtype.  For this elaboration, the  index  constraint
  5544. and  the  component  subtype  indication are elaborated.  The evaluation of
  5545. each discrete range of the index constraint  and  the  elaboration  of  the
  5546. component  subtype  indication  are  performed  in  some  order that is not
  5547. defined by the language.
  5548. Examples of type declarations with unconstrained array definitions:
  5549.     \utype\n VECTOR     \uis array\n(INTEGER  \urange\n <>) \uof\n REAL;
  5550.     \utype\n MATRIX     \uis array\n(INTEGER  \urange\n <>, INTEGER \urange\n <>) \uof\n REAL;
  5551.     \utype\n BIT_VECTOR \uis array\n(INTEGER  \urange\n <>) \uof\n BOOLEAN;
  5552.     \utype\n ROMAN      \uis array\n(POSITIVE \urange\n <>) \uof\n ROMAN_DIGIT;
  5553. Examples of type declarations with constrained array definitions:
  5554.     \utype\n TABLE    \uis array\n(1 .. 10) \uof\n INTEGER;
  5555.     \utype\n SCHEDULE \uis array\n(DAY) \uof\n BOOLEAN;
  5556.     \utype\n LINE     \uis array\n(1 .. MAX_LINE_SIZE) \uof\n CHARACTER;
  5557. Examples of object declarations with constrained array definitions:
  5558.     GRID : \uarray\n(1 .. 80, 1 .. 100) \uof\n BOOLEAN;
  5559.     MIX  : \uarray\n(COLOR \urange\n RED .. GREEN) \uof\n BOOLEAN;
  5560.     PAGE : \uarray\n(1 .. 50) \uof\n LINE;  --  an array of arrays
  5561. Note:
  5562. For a one-dimensional array, the rule given means that a  type  declaration
  5563. with a constrained array definition such as
  5564.     \utype\n T \uis array\n(POSITIVE \urange\n MIN .. MAX) \uof\n COMPONENT;
  5565. is  equivalent  (in  the  absence  of an incorrect order dependence) to the
  5566. succession of declarations
  5567.     \usubtype\n index_subtype \uis\n POSITIVE \urange\n MIN .. MAX;
  5568.     \utype\n array_type \uis\n \uarray\n(index_subtype range <>) \uof\n COMPONENT;
  5569.     \usubtype\n T \uis\n array_type (index_subtype);
  5570. where index_subtype and array_type are both anonymous.  Consequently, T  is
  5571. the  name  of  a  subtype  and all objects declared with this type mark are
  5572. arrays that  have  the  same  bounds.   Similar  transformations  apply  to
  5573. multidimensional arrays.
  5574. A  similar transformation applies to an object whose declaration includes a
  5575. constrained array definition.  A consequence of this is that  no  two  such
  5576. objects have the same type.
  5577. More details:
  5578.  3.6.1  \vIndex Constraints and Discrete Ranges\v322.
  5579.  3.6.2  \vOperations of Array Types\v323.
  5580.  3.6.3  \vThe Type String\v324.
  5581. 3.6.1    \uIndex Constraints and Discrete Ranges\n
  5582. An \vindex constraint\v322. determines the \vrange\v310. of possible values for every \vindex\v321.
  5583. of an \varray type\v321., and thereby the corresponding \varray bounds\v321..
  5584. For a \vdiscrete range\v321. used in a constrained \varray definition\v321. and defined  by
  5585. a  range,  an implicit \vconversion\v419. to the predefined type INTEGER is assumed
  5586. if each bound is either a numeric literal, a named number, or an attribute,
  5587. and the type of both bounds (prior to the implicit conversion) is the  type
  5588. universal_integer.   Otherwise,  both  bounds  must be of the same discrete
  5589. type,  other  than  \vuniversal_integer\v314.;   this  type  must  be  determinable
  5590. independently  of  the  context,  but  using the fact that the type must be
  5591. discrete and that both bounds must have the same type.  These  rules  apply
  5592. also  to  a  discrete  range  used in an \viteration rule\v506. (see 5.5) or in the
  5593. declaration of a family of entries (see 9.5).
  5594. If an index constraint follows a \vtype mark\v307. in a  \vsubtype  indication\v307.,  then
  5595. the  type  or  subtype  denoted by the type mark must not already impose an
  5596. index constraint.  The type mark must denote either an \vunconstrained  array\v321.
  5597. type  or  an  \vaccess  type\v330. whose \vdesignated\v330. type is such an array type.  In
  5598. either case, the index constraint must provide a discrete  range  for  each
  5599. index  of  the  array  type and the type of each discrete range must be the
  5600. same as that of the corresponding index.
  5601. An index constraint is \vcompatible\v307. with the type denoted by the type mark if
  5602. and only if the constraint defined by each  discrete  range  is  compatible
  5603. with  the  corresponding  \vindex  subtype\v321..   If  any  of the discrete ranges
  5604. defines a \vnull range\v310., any array thus constrained is a null array, having no
  5605. components.  An array value satisfies an index constraint if at each  index
  5606. position  the  array  value  and  the  index constraint have the same index
  5607. bounds.  (Note,  however, that assignment and certain other  operations  on
  5608. arrays involve an implicit \vsubtype conversion\v419..)
  5609. The bounds of each array \vobject\v302. are determined as follows:
  5610.   -  For  a  \vvariable\v303.  declared  by  an  \vobject  declaration\v303.,  the  subtype
  5611.      indication  of  the  corresponding  object  declaration  must define a
  5612.      \vconstrained array  subtype\v321.  (and,  thereby,  the  bounds).   The  same
  5613.      requirement   exists   for  the  subtype  indication  of  a  \vcomponent\v325.
  5614.      \vdeclaration\v325., if the type of the \vrecord component\v325.  is  an  array  type;
  5615.      and  for the component subtype indication of an array type definition,
  5616.      if the type of the array components is itself an array type.
  5617.   -  For a \vconstant\v303. declared by an object declaration, the  bounds  of  the
  5618.      constant  are  defined  by  the  \vinitial  value\v303.  if the subtype of the
  5619.      constant is unconstrained;  they are otherwise defined by this subtype
  5620.      (in the latter case, the initial value is the result  of  an  implicit
  5621.      subtype  conversion).   The  same  rule  applies  to  a \vgeneric formal\v1201.
  5622.      parameter of \vmode\v1202. in.
  5623.   -  For an array object designated by an \vaccess value\v330., the bounds must  be
  5624.      defined  by  the  \vallocator\v421.  that  creates  the  array  object.   (The
  5625.      allocated object is constrained with the corresponding values  of  the
  5626.      bounds.)
  5627.   -  For a \vformal parameter\v601. of  a  \vsubprogram\v600.  or  \ventry\v905.,  the  bounds  are
  5628.      obtained   from  the  corresponding  \vactual  parameter\v607..   (The  formal
  5629.      parameter is constrained with the corresponding values of the bounds.)
  5630.   -  For a \vrenaming declaration\v805. and for a generic \vformal parameter\v601. of  mode
  5631.      in  out,  the  bounds  are  those  of  the  renamed  object  or of the
  5632.      corresponding \vgeneric actual parameter\v1206..
  5633. For the elaboration  of  an  index  constraint,  the  discrete  ranges  are
  5634. evaluated in some order that is not defined by the language.
  5635. Examples of array declarations including an index constraint:
  5636.     BOARD     : MATRIX(1 .. 8,  1 .. 8);  --  see 3.6
  5637.     RECTANGLE : MATRIX(1 .. 20, 1 .. 30);
  5638.     INVERSE   : MATRIX(1 .. N,  1 .. N);  --  N need not be static
  5639.     FILTER    : BIT_VECTOR(0 .. 31);
  5640. Example of array declaration with a constrained array subtype:
  5641.     MY_SCHEDULE : SCHEDULE;  --  all arrays of type SCHEDULE have the same
  5642.                                  bounds
  5643. Example of record type with a component that is an array:
  5644.     \utype\n VAR_LINE(LENGTH : INTEGER) \uis\n
  5645.        \urecord\n
  5646.           IMAGE : STRING(1 .. LENGTH);
  5647.        \uend record\n;
  5648.     NULL_LINE : VAR_LINE(0);  --  NULL_LINE.IMAGE is a null array
  5649. \uNotes:\n
  5650. The  elaboration of a subtype indication consisting of a type mark followed
  5651. by an index constraint checks the compatibility  of  the  index  constraint
  5652. with the type mark (see 3.3.2).
  5653. All  components  of  an array have the same subtype.  In particular, for an
  5654. array of components that are one-dimensional arrays, this  means  that  all
  5655. components have the same  bounds and hence the same length.
  5656. 3.6.2    \uOperations of Array Types\n
  5657. The \vbasic operations\v308. of an array type include the  operations  involved  in
  5658. \vassignment\v502.  and  \vaggregates\v407.  (unless the \varray type\v321. is limited), \vmembership\v411.
  5659. \vtests\v411., \vindexed components\v402., qualification,  and  explicit  \vconversion\v419.;   for
  5660. one-dimensional  arrays  the  basic  operations also include the operations
  5661. involved in \vslices\v403., and also \vstring literals\v208. if the  component  type  is  a
  5662. \vcharacter type\v312..
  5663. If  A  is  an array \vobject\v302., an array value, or a \vconstrained array subtype\v321.,
  5664. the basic operations also  include  the  \vattributes\v405.  listed  below.   These
  5665. attributes are not allowed for an \vunconstrained array type\v321..  The argument N
  5666. used  in  the attribute \vdesignators\v601. for the N-th \vdimension\v321. of an array must
  5667. be a \vstatic expression\v422. of type universal_integer.  The value of N  must  be
  5668. positive (nonzero) and no greater than the dimensionality of the array.
  5669. A'FIRST         Yields the lower bound of the first \vindex\v321. range.  The value
  5670.                 of this attribute has the same type as this lower bound.
  5671. A'FIRST(N)      Yields the lower bound of the N-th index range.  The  value
  5672.                 of this attribute has the same type as this lower bound.
  5673. A'LAST          Yields the upper bound of the first index range.  The value
  5674.                 of this attribute has the same type as this upper bound.
  5675. A'LAST(N)       Yields the upper bound of the N-th index range.  The  value
  5676.                 of this attribute has the same type as this upper bound.
  5677. A'RANGE         Yields the first index range, that is, the range A'FIRST ..
  5678.                 A'LAST.
  5679. A'RANGE(N)      Yields the N-th index range, that is, the range  A'FIRST(N)
  5680.                 .. A'LAST(N).
  5681. A'LENGTH        Yields the number of values of the first index range  (zero
  5682.                 for  a  \vnull range\v310.).  The value of this attribute is of the
  5683.                 type universal_integer.
  5684. A'LENGTH(N)     Yields the number of values of the N-th index  range  (zero
  5685.                 for  a  null range).  The value of this attribute is of the
  5686.                 \vtype universal_integer\v314..
  5687. In addition, the attribute T'BASE is defined for an array type or subtype T
  5688. (see 3.3.3);  the attribute T'SIZE is defined for an array type or  subtype
  5689. T,  and the attributes A'SIZE and A'ADDRESS are defined for an array object
  5690. A (see 13.7.2).
  5691. Besides the basic operations, the operations of an array type  include  the
  5692. predefined comparison for equality and inequality, unless the array type is
  5693. limited.   For  one-dimensional  arrays, the operations include \vcatenation\v411.,
  5694. unless the array \vtype is limited\v708.;  if the  component  type  is  a  discrete
  5695. type,  the operations also include all predefined \vrelational operators\v411.;  if
  5696. the component type is a boolean type, then the operations also include  the
  5697. unary logical negation \voperator not\v411., and the \vlogical operators\v411..
  5698. Examples (using arrays declared in the examples of section 3.6.1):
  5699. --  FILTER'FIRST      =   0   FILTER'LAST       = 31   FILTER'LENGTH  =  32
  5700. --  RECTANGLE'LAST(1) =   20  RECTANGLE'LAST(2) = 30
  5701. \uNotes:\n
  5702. The  attributes  A'FIRST  and  A'FIRST(1)  yield the same value.  A similar
  5703. relation exists for the attributes  A'LAST,  A'RANGE,  and  A'LENGTH.   The
  5704. following  relations  are  satisfied (except for a null array) by the above
  5705. attributes if the index type is an integer type:
  5706.     A'LENGTH    = A'LAST    - A'FIRST    + 1
  5707.     A'LENGTH(N) = A'LAST(N) - A'FIRST(N) + 1
  5708. An array type is limited if its component type is limited (see 7.4.4).
  5709. 3.6.3    \uThe Type String\n
  5710. The  values of the predefined type STRING are one-dimensional arrays of the
  5711. predefined \vtype CHARACTER\v312., indexed by  values  of  the  predefined  subtype
  5712. POSITIVE:
  5713.     \usubtype\n POSITIVE \uis\n INTEGER \urange\n 1 .. INTEGER'LAST;
  5714.     \utype\n STRING \uis array\n(POSITIVE \urange\n <>) \uof\n CHARACTER;
  5715. \uExamples:\n
  5716.     STARS      : STRING(1 .. 120) := (1 .. 120 => '*' );
  5717.     QUESTION   : \uconstant\n STRING  := "HOW MANY CHARACTERS?";
  5718.     --  QUESTION'FIRST = 1, QUESTION'LAST = 20 (the number of characters)
  5719.     ASK_TWICE  : \uconstant\n STRING  := QUESTION & QUESTION;
  5720.     NINETY_SIX : \uconstant\n WOMAN   := "XCVI";        --  see 3.6
  5721. \uNotes:\n
  5722. String  literals  (see  2.6 and 4.2) are basic operations applicable to the
  5723. \vtype\v321. STRING and to any other one-dimensional  array  type  whose  \vcomponent\v321.
  5724. type is a character type.  The \vcatenation operator\v411. is a \vpredefined\v411. \voperator\v411.
  5725. for the type STRING and for one-dimensional array types;  it is represented
  5726. as  &.  The relational operators <, <=, >, and >= are defined for values of
  5727. these types, and correspond to \vlexicographic order\v413. (see 4.5.2).
  5728. 3.7      \uRecord Types\n
  5729. A record \vobject\v302. is a composite object consisting of named \vcomponents\v305..   The
  5730. value  of  a record object is a \vcomposite value\v305. consisting of the values of
  5731. its components.
  5732.     record_type_definition ::=
  5733.        \urecord\n
  5734.           component_list
  5735.        \uend record\n
  5736.     component_list ::=
  5737.           component_declaration {component_declaration}
  5738.        | {component_declaration} \vvariant_part\v328.
  5739.        |  \unull\n;
  5740.     component_declaration ::=
  5741.        \videntifier_list\v302. : component_subtype_definition [:= expression];
  5742.     component_subtype_definition ::=  subtype_indication
  5743. Each component  \vdeclaration\v301.  declares  a  component  of  the  record  type.
  5744. Besides  components declared by component declarations, the components of a
  5745. record type include any components declared by \vdiscriminant\v305.  specifications
  5746. of  the  record  type  declaration.  The identifiers of all components of a
  5747. record type must be distinct.  The use of a  \vname\v401.  that  denotes  a  record
  5748. component  other  than a discriminant is not allowed within the record type
  5749. definition that declares the component.
  5750. A component  declaration  with  several  identifiers  is  equivalent  to  a
  5751. sequence  of  single  component  declarations, as explained in section 3.2.
  5752. Each single component declaration declares a record component whose subtype
  5753. is specified by the component subtype definition.
  5754. If a component  declaration  includes  the  \vassignment  compound  delimiter\v202.
  5755. followed  by an \vexpression\v410., the expression is the default expression of the
  5756. record component;  the default expression  must  be  of  the  type  of  the
  5757. component.   Default expressions are not allowed for components that are of
  5758. a \vlimited type\v708..
  5759. If a record type does not have a \vdiscriminant part\v325., the same components are
  5760. present in all values of the type.  If the component list of a record  type
  5761. is  defined  by  the  reserved word null and there is no discriminant part,
  5762. then the record type has no components and all records of the type are null
  5763. records.
  5764. The \velaboration\v333. of a record type definition  creates  a  record  type;   it
  5765. consists  of  the  elaboration  of  any  corresponding  (single)  component
  5766. declarations, in the order in which they appear,  including  any  component
  5767. declaration  in a variant part.  The elaboration of a component declaration
  5768. consists of the elaboration of the component subtype definition.
  5769. For the elaboration of a component subtype definition,  if  the  \vconstraint\v305.
  5770. does  not \vdepend on a discriminant\v326. (see 3.7.1), then the subtype indication
  5771. is elaborated.  If,  on  the  other  hand,  the  constraint  depends  on  a
  5772. discriminant,  then  the  elaboration  consists  of  the  evaluation of any
  5773. included expression that is not a discriminant.
  5774. Examples of record type declarations:
  5775.     \utype\n DATE \uis\n
  5776.        \urecord\n
  5777.           DAY   : INTEGER \urange\n 1 .. 31;
  5778.           MONTH : MONTH_NAME;
  5779.           YEAR  : INTEGER \urange\n 0 .. 4000;
  5780.        \uend record\n;
  5781.     \utype\n COMPLEX \uis\n
  5782.        \urecord\n
  5783.           RE : REAL := 0.0;
  5784.           IM : REAL := 0.0;
  5785.        \uend record\n;
  5786. Examples of record variables:
  5787.     TOMORROW, YESTERDAY : DATE;
  5788.     A, B, C : COMPLEX;
  5789.     -- both components of A, B, and C are implicitly initialized to zero
  5790. \uNotes:\n
  5791. The default expression of a record component is implicitly evaluated by the
  5792. elaboration of the declaration of a record object, in  the  absence  of  an
  5793. explicit  initialization  (see  3.2.1).   If  a  component  declaration has
  5794. several identifiers,  the  expression  is  evaluated  once  for  each  such
  5795. component  of the object (since the declaration is equivalent to a sequence
  5796. of single component declarations).
  5797. Unlike the components of an array, the components of a record need  not  be
  5798. of the same type.
  5799. More details:
  5800.  3.7.1  \vDiscriminants\v326.
  5801.  3.7.2  \vDiscriminant Constraints\v327.
  5802.  3.7.3  \vVariant Parts\v328.
  5803.  3.7.4  \vOperations of Record Types\v329.
  5804. 3.7.1    \uDiscriminants\n
  5805. A discriminant part specifies the discriminants of a type.  A  discriminant
  5806. of  a record is a \vcomponent of the record\v325..  The type of a discriminant must
  5807. be discrete.
  5808.     discriminant_part ::=
  5809.        (discriminant_specification {; discriminant_specification})
  5810.     discriminant_specification ::=
  5811.        identifier_list : type_mark [:= expression]
  5812. A discriminant part is only allowed in the type \vdeclaration\v301.  for  a  record
  5813. type,  in a \vprivate type\v704. declaration or an \vincomplete type\v331. \vdeclaration\v331. (the
  5814. corresponding full declaration must then declare a \vrecord type\v325.), and in the
  5815. \vgeneric parameter declaration\v1201. for a formal private type.
  5816. A discriminant specification with several \videntifiers\v203. is  equivalent  to  a
  5817. sequence  of  single  discriminant  specifications, as explained in section
  5818. 3.2.  Each single discriminant specification declares a discriminant.  If a
  5819. discriminant  specification  includes  the  \vassignment  compound  delimiter\v202.
  5820. followed  by an expression, the expression is the default expression of the
  5821. discriminant;   the  default  expression  must  be  of  the  type  of   the
  5822. discriminant.   Default  expressions must be provided either for all or for
  5823. none of the discriminants of a discriminant part.
  5824. The use of the name of a discriminant is not allowed in default expressions
  5825. of a discriminant part if the specification of the discriminant  is  itself
  5826. given in the discriminant part.
  5827. Within  a  record  type  definition  the only allowed uses of the name of a
  5828. discriminant of the record type are:  in the default expressions for record
  5829. components;  in a  variant  part  as  the  discriminant  name;   and  in  a
  5830. component  subtype definition, either as a bound in an \vindex constraint\v322., or
  5831. to  specify  a  discriminant  value  in  a  discriminant   constraint.    A
  5832. discriminant  name  used in these component subtype definitions must appear
  5833. by itself, not as part of a  larger  expression.   Such  component  subtype
  5834. definitions and such constraints are said to depend on a discriminant.
  5835. A component is said to depend on a discriminant if it is a record component
  5836. declared  in  a variant part, or a record component whose component subtype
  5837. definition depends on a discriminant, or finally, one of the  \vsubcomponents\v305.
  5838. of a component that itself depends on a discriminant.
  5839. Each  record value includes a value for each discriminant specified for the
  5840. record type;  it also includes a value for each record component that  does
  5841. not  depend  on  a discriminant.  The values of the discriminants determine
  5842. which other component values are in the record value.
  5843. Direct  \vassignment\v502.  to  a  discriminant  of  an  object  is  not   allowed;
  5844. furthermore a discriminant is not allowed as an actual parameter of mode in
  5845. out  or  out,  or  as  a generic actual parameter of mode in out.  The only
  5846. allowed way to change the value of a  discriminant  of  a  variable  is  to
  5847. assign a (complete) value to the variable itself.  Similarly, an assignment
  5848. to  the variable itself is the only allowed way to change the constraint of
  5849. one of its components, if the component subtype  definition  depends  on  a
  5850. discriminant of the variable.
  5851. The elaboration of a discriminant part has no other effect.
  5852. \uExamples:\n
  5853.     \utype\n BUFFER(SIZE : BUFFER_SIZE := 100)  \uis\n        -- see 3.5.4
  5854.        \urecord\n
  5855.           POS   : BUFFER_SIZE := 0;
  5856.           VALUE : STRING(1 .. SIZE);
  5857.        \uend record\n;
  5858.     \utype\n SQUARE(SIDE : INTEGER) \uis\n
  5859.        \urecord\n
  5860.           MAT : MATRIX(1 .. SIDE, 1 .. SIDE);       -- see 3.6
  5861.        \uend record\n;
  5862.     \utype\n DOUBLE_SQUARE(NUMBER : INTEGER) \uis\n
  5863.        \urecord\n
  5864.           LEFT  : SQUARE(NUMBER);
  5865.           RIGHT : SQUARE(NUMBER);
  5866.        \uend record\n;
  5867.     \utype\n ITEM(NUMBER : POSITIVE) \uis\n
  5868.        \urecord\n
  5869.           CONTENT : INTEGER;
  5870.           --  no component depends on the discriminant
  5871.        \uend record\n;
  5872. 3.7.2    \uDiscriminant Constraints\n
  5873. A  discriminant constraint is only allowed in a \vsubtype\v305. indication, after a
  5874. type mark.  This type mark must denote either a type with discriminants, or
  5875. an \vaccess type\v330. whose \vdesignated type\v330.  is  a  type  with  \vdiscriminants\v305..   A
  5876. discriminant constraint specifies the values of these discriminants.
  5877.     discriminant_constraint ::=
  5878.       (discriminant_association {, discriminant_association})
  5879.     discriminant_association ::=
  5880.       [discriminant_simple_name {| discriminant_simple_name} =>] expression
  5881. Each  discriminant  association  associates  an \vexpression\v410. with one or more
  5882. discriminants.  A discriminant association is  said  to  be  named  if  the
  5883. discriminants  are  specified  explicitly  by their \vnames\v401.;  it is otherwise
  5884. said  to  be  positional.   For  a  positional  association,  the  (single)
  5885. discriminant  is implicitly specified by position, in textual order.  Named
  5886. associations can be given in any order, but if both  positional  and  named
  5887. associations  are used in the same discriminant constraint, then positional
  5888. associations must occur first, at their  normal  position.   Hence  once  a
  5889. named association is used, the rest of the discriminant constraint must use
  5890. only named associations.
  5891. For  a  named  discriminant association, the discriminant names must denote
  5892. discriminants of the type for which the discriminant constraint  is  given.
  5893. A  discriminant  association  with  more than one discriminant name is only
  5894. allowed if the named discriminants are all of the same type.   Furthermore,
  5895. for  each  discriminant  association  (whether  named  or  positional), the
  5896. expression and the associated discriminants must have  the  same  type.   A
  5897. discriminant   constraint   must   provide   exactly  one  value  for  each
  5898. discriminant of the type.
  5899. A discriminant constraint is \vcompatible\v307. with the type  denoted  by  a  type
  5900. mark,  if and only if each discriminant value belongs to the subtype of the
  5901. corresponding discriminant.   In  addition,  for  each  \vsubcomponent\v305.  whose
  5902. \vcomponent   subtype   specification\v325.   \vdepends   on    a \v326. \vdiscriminant\v326.,  the
  5903. discriminant value is substituted for the discriminant  in  this  component
  5904. subtype  specification  and  the  compatibility  of  the  resulting subtype
  5905. indication is checked.
  5906. A \vcomposite value\v305. satisfies a discriminant constraint if and only  if  each
  5907. discriminant   of  the  composite  value  has  the  value  imposed  by  the
  5908. discriminant constraint.
  5909. The initial values of the  discriminants  of  an  \vobject\v302.  of  a  type  with
  5910. discriminants are determined as follows:
  5911.   -  For  a  \vvariable\v303.  declared  by  an  object  declaration,  the  subtype
  5912.      indication  of  the  corresponding  object  declaration  must impose a
  5913.      discriminant constraint  unless  \vdefault  expressions\v325.  exist  for  the
  5914.      discriminants;   the  discriminant  values  are  defined either by the
  5915.      constraint or, in its absence, by the default expressions.   The  same
  5916.      requirement   exists   for  the  subtype  indication  of  a  \vcomponent\v325.
  5917.      \vdeclaration\v325., if the type of the record  component  has  discriminants;
  5918.      and for the component subtype indication of an \varray type\v321., if the type
  5919.      of the array components is a type with discriminants.
  5920.   -  For a constant declared by an object declaration, the  values  of  the
  5921.      discriminants  are  those  of  the initial value if the subtype of the
  5922.      constant is unconstrained;  they are otherwise defined by this subtype
  5923.      (in the latter case, an exception is raised if the initial value  does
  5924.      not  belong  to  this  subtype).   The  same rule applies to a generic
  5925.      parameter of \vmode in\v601..
  5926.   -  For an object designated by an access value, the  discriminant  values
  5927.      must  be  defined  by  the  \vallocator\v421.  that  creates the object.  (The
  5928.      allocated object is constrained with  the  corresponding  discriminant
  5929.      values.)
  5930.   -  For a \vformal parameter\v601. of a \vsubprogram\v600. or \ventry\v905., the discriminants  of
  5931.      the  formal  parameter are initialized with those of the corresponding
  5932.      \vactual  parameter\v607..   (The  formal  parameter  is  constrained  if  the
  5933.      corresponding  actual parameter is constrained, and in any case if the
  5934.      mode is in or if the subtype of the formal parameter is  constrained.)
  5935.   -  For a \vrenaming declaration\v805. and for a \vgeneric formal parameter\v1201. of  mode
  5936.      in  out,  the  discriminants are those of the renamed object or of the
  5937.      corresponding \vgeneric actual parameter\v1206..
  5938. For the \velaboration\v333. of a discriminant constraint, the expressions given  in
  5939. the  discriminant  associations  are  evaluated  in  some order that is not
  5940. defined by  the  language;   the  expression  of  a  named  association  is
  5941. evaluated once for each named discriminant.
  5942. Examples (using types declared in the previous section): 01
  5943.   LARGE   : BUFFER(200);  --  constrained, always 200 characters (explicit
  5944.                               discriminant value)
  5945.   MESSAGE : BUFFER;       --  unconstrained, initially 100 characters
  5946.                               (default discriminant value)
  5947.   BASIS   : SQUARE(5);    --  constrained, always 5 by 5
  5948.   ILLEGAL : SQUARE;       --  illegal, a SQUARE must be constrained
  5949. Note:
  5950. The  above  rules  and  the  rules  defining  the  elaboration of an object
  5951. declaration (see 3.2) ensure that discriminants always have  a  value.   In
  5952. particular,   if   a  discriminant  constraint  is  imposed  on  an  object
  5953. declaration, each discriminant is initialized with the value  specified  by
  5954. the   constraint.    Similarly,  if  the  subtype  of  a  component  has  a
  5955. discriminant  constraint,  the   discriminants   of   the   component   are
  5956. correspondingly initialized.
  5957. 3.7.3    \uVariant Parts\n
  5958. A   \vrecord  type\v325.  with  a  variant  part  specifies  alternative  lists  of
  5959. \vcomponents\v305..  Each variant defines  the  components  for  the  corresponding
  5960. value or values of the discriminant.
  5961.     variant_part ::=
  5962.        \ucase\n discriminant_simple_name \uis\n
  5963.            variant
  5964.           {variant}
  5965.        \uend case\n;
  5966.     variant ::=
  5967.        \uwhen\n choice {| choice} =>
  5968.           \vcomponent_list\v325.
  5969.     choice ::= \vsimple_expression\v410.
  5970.        | \vdiscrete_range\v321. | \uothers\n | component_simple_name
  5971. Each  variant  starts with a list of choices which must be of the same type
  5972. as the \vdiscriminant\v305. of the variant part.  The type of the discriminant of a
  5973. variant part must not be a \vgeneric formal type\v1201..   If  the  \vsubtype\v305.  of  the
  5974. discriminant is static, then each value of this subtype must be represented
  5975. once  and only once in the set of choices of the variant part, and no other
  5976. value is allowed.   Otherwise,  each  value  of  the  \v(base)  type\v305.  of  the
  5977. discriminant  must be represented once and only once in the set of choices.
  5978. The simple expressions and discrete \vranges\v310. given as choices  in  a  variant
  5979. part  must  be static.  A choice defined by a discrete range stands for all
  5980. values in the corresponding range (none  if  a  \vnull  range\v310.).   The  choice
  5981. others  is  only  allowed  for the last variant and as its only choice;  it
  5982. stands for all values (possibly none) not given in the choices of  previous
  5983. variants.   A component \vsimple name\v401. is not allowed as a choice of a variant
  5984. (although it is part of the syntax of choice).
  5985. A record value contains the values of the components of a given variant  if
  5986. and  only if the discriminant value is equal to one of the values specified
  5987. by the choices of the variant.  This rule applies in turn  to  any  further
  5988. variant  that  is,  itself,  included  in  the  component list of the given
  5989. variant.  If the component list of a variant  is  specified  by  null,  the
  5990. variant has no components.
  5991. Example of record type with a variant part:
  5992.     \utype\n DEVICE \uis\n (PRINTER, DISK, DRUM);
  5993.     \utype\n STATE  \uis\n (OPEN, CLOSED);
  5994.     \utype\n PERIPHERAL(UNIT : DEVICE := DISK) \uis\n
  5995.        \urecord\n
  5996.           STATUS : STATE;
  5997.           \ucase\n UNIT \uis\n
  5998.              \uwhen\n PRINTER =>
  5999.                 LINE_COUNT : INTEGER \urange\n 1 .. PAGE_SIZE;
  6000.              \uwhen others\n =>
  6001.                 CYLINDER   : CYLINDER_INDEX;
  6002.                 TRACK      : TRACK_NUMBER;
  6003.              \uend case\n;
  6004.           \uend record\n;
  6005. Examples of record subtypes:
  6006.     \usubtype\n DRUM_UNIT \uis\n PERIPHERAL(DRUM);
  6007.     \usubtype\n DISK_UNIT \uis\n PERIPHERAL(DISK);
  6008. Examples of constrained record ariables:
  6009.     WRITER   : PERIPHERAL(UNIT  => PRINTER);
  6010.     ARCHIVE  : DISK_UNIT;
  6011. Note:
  6012. Choices with discrete values are also used in case statements and in  \varray\v409.
  6013. \vaggregates\v409..   Choices  with  component  simple  names  are  used  in record
  6014. aggregates.
  6015. 3.7.4    \uOperations of Record Types\n
  6016. The \vbasic operations\v308. of a \vrecord type\v325. include the  operations  involved  in
  6017. \vassignment\v502. and aggregates (unless the type is limited),  membership  tests,
  6018. selection of record components, qualifications, and  type  \vconversion\v419.  (for
  6019. \vderived types\v309.)
  6020. For any \vobject\v303. A of a type with \vdiscriminants\v305., the  basic  \voperations\v305.  also
  6021. include the following \vattribute\v405.:
  6022. A'CONSTRAINED     Yields the value  TRUE  if  the  discriminant  constraint
  6023.                   applies to the object A, or if the object is  a  \vconstant\v303.
  6024.                   (including a formal parameter or generic formal parameter
  6025.                   of \vmode\v303. in); yields the value FALSE otherwise.  If A is a
  6026.                   generic  formal  parameter  of  mode in out, or if A is a
  6027.                   formal parameter of mode in out or out and the type  mark
  6028.                   given  in  the  corresponding   parameter   specification
  6029.                   denotes  an  unconstrained  type with discriminants, then
  6030.                   the value of this attribute is obtained from that of  the
  6031.                   corresponding \vactual parameter\v607..  The value of this attri-
  6032.                   bute is of the predefined type \vBOOLEAN\v313..
  6033. In addition, the attributes T'BASE and T'SIZE are defined for a record type
  6034. or subtype T (see 3.3.3); the attributes A'SIZE and  A'ADDRESS  are defined
  6035. for a record object A (see 13.7.2).
  6036. Besides  the  basic operations, the operations of a record type include the
  6037. predefined  comparison  for  equality  and  inequality,  unless the type is
  6038. limited.
  6039. Note:
  6040. A record type is limited if the type of any of its  components  is  limited
  6041. (see 7.4.2).
  6042. 3.8      \uAcess Types\n
  6043. An object declared by an object declaration is created by  the  \velaboration\v333.
  6044. of the object declaration and is denoted by a simple \vname\v401. or by some  other
  6045. form of name.  In contrast, there are objects that are created by the eval-
  6046. uation of \vallocators\v421. (see 4.8) and that have no  simple  name.   Access  to
  6047. such an object is achieved by an access value returned by an allocator; the
  6048. access value is said to designate the object.
  6049.     access_type_definition ::= \uaccess\n subtype_indication
  6050. For each access type, there is a \vliteral\v406. null which has a null access value
  6051. designating  no  object  at  all.   The null value of an access type is the
  6052. default initial value of the type.  Other values  of  an  access  type  are
  6053. obtained  by  evaluation  of  a  special  operation  of  the type called an
  6054. allocator.  Each such access value designates  an  object  of  the  \vsubtype\v305.
  6055. defined  by  the  \vsubtype  indication\v307.  of  the access type definition; this
  6056. subtype is called the designated subtype;  the base type of this subtype is
  6057. called  the  designated  type.   The objects designated by the values of an
  6058. access type form a collection implicitly associated with the type.
  6059. The elaboration of an access type definition consists of the elaboration of
  6060. the subtype indication and creates an access type.
  6061. If an access object is \vconstant\v303., the  constrained  access  value  cannot be
  6062. changed and always designates the same object. On the other hand, the value
  6063. of  the  designated  object  need  not  remain the same (\vassignment\v502.  to the
  6064. designated object is allowed unless the designated \vtype is limited\v708.).
  6065. The only forms of contraint that are allowed after the  name  of  an access
  6066. type  in  a  subtype  indication  are  index  \vconstraints\v305.  and \vdiscriminant\v327.
  6067. \vconstraints\v327..  (See  sections  3.6.1  and  3.7.2 for the rules applicable to
  6068. these subtype indications.)   An  access  value  belongs to a corresponding
  6069. subtype of an access type either if the access value  is  the null value or
  6070. if the value of the designated object satisfies the constraint.
  6071. \uExamples:\n
  6072.     \utype\n FRAME \uis access\n MATRIX;         --  see 3.6
  6073.     \utype\n BUFFER_NAME \uis access\n BUFFER    --  see 3.7.1
  6074. \uNotes:\n
  6075. An access value delivered by an allocator can be assigned to several access
  6076. objects.  Hence it is  possible for an object created by an allocator to be
  6077. designated by more than one  \vvariable\v303.  or  constant of the access type.  An
  6078. access  value  can only designate an object created  by  an  allocator;  in
  6079. particular,  it  cannot  designate  an  object  declared   by   an   object
  6080. declaration.
  6081. If the type of the objects designated by the access values is an \varray type\v321.
  6082. or a type with discriminants, these objects are constrained with either the
  6083. array  bounds  or  the discriminant values supplied implicitly or explicity
  6084. for the corresponding allocators (see 4.8).
  6085. Access values are called pointers of references in some other languages.
  6086. More details:
  6087.  3.8.1  \vIncomplete Type Declarations\v331.
  6088.  3.8.2  \vOperations of Access Types\v332.
  6089. 3.8.1    \uIncomplete Type Declarations\n
  6090. There are  no particular limitations on  the  \vdesignated\v330.  type of an access
  6091. type.  In particular, the type of a \vcomponent\v305. of the designated type can be
  6092. another  \vaccess  type\v330., or even the same access type.  This permits mutually
  6093. dependent  and recursive access types.  Their declarations require a  prior
  6094. incomplete (or private) type declaration for one or more types.
  6095.      incomplete_type_declaration ::= type identifier [discriminant_part];
  6096. For  each incomplete  type  declaration,  there  must  be  a  corresponding
  6097. declaration  of  a  type  with  the  same  identifier.   The  corresponding
  6098. declaration must be either a full type declaration or the declarations of a
  6099. task type.  In the rest of this section, explanations are given in terms of
  6100. full  type declarations;  the same rules apply also to declarations of task
  6101. types.  If the incomplete type declaration occurs immediately within either
  6102. a declarative part or the visible part of a package specification, then the
  6103. full  type  declaration  must  occur  later  and  immediately  within  this
  6104. declarative part or visible part. If the incomplete type declaration occurs
  6105. immediately  within  private  part  of  a  package,  then  the  full   type
  6106. declaration must occur later and immediately within either the private part
  6107. itself, or the declarative part of the corresponding package body.
  6108. A \vdiscriminant part\v326. must be given in the full type  declaration if and only
  6109. if one is given in the incomplete type declaration;  if discriminant  parts
  6110. are given, then they must \vconform\v604. (see  6.3.1  for the  conformance rules).
  6111. Prior to the end of  the  full  type declaration, the only allowed use of a
  6112. \vname\v401. that  denotes  a type declared by an incomplete type declaration is as
  6113. the  \vtype  mark\v307. in the subtype indication of an \vaccess type definition\v330.; the
  6114. only  form  of  \vconstraint\v305.  allowed  in  this  subtype   indication  is   a
  6115. \vdiscriminant constraint\v327..
  6116. The \velaboration\v333.  of an  incomplete type \vdeclaration\v301. creates a type.  If the
  6117. incomplete type declaration  has  a  discriminant  part,  this  elaboration
  6118. includes  that of  the discriminant part:  in such a case, the discriminant
  6119. part of the full type declaration is not elaborated.
  6120. Example of a recursive type:
  6121.     \utype\n CELL;  --  incomplete type declaration
  6122.     \utype\n LINK \uis access\n CELL;
  6123.     \utype\n CELL \uis\n
  6124.        \urecord\n
  6125.           VALUE  : INTEGER;
  6126.           SUCC   : LINK;
  6127.           PRED   : LINK;
  6128.        \uend record\n;
  6129.     HEAD   : LINK  := \unew\n CELL'(O, \unull\n, \unull\n);
  6130.     NEXT   : LINK  := HEAD.SUCC;
  6131. Examples of mutually dependent access types:
  6132.     \utype\n PERSON(SEX : GENDER);  -- incomplete type declaration
  6133.     \utype\n CAR;                   -- incomplete type declaration
  6134.     \utype\n PERSON_NAME \uis access\n PERSON;
  6135.     \utype\n CAR_NAME    \uis access\n CAR;
  6136.     \utype\n CAR \uis\n
  6137.        \urecord\n
  6138.           NUMBER  : INTEGER;
  6139.           OWNER   :PERSON_NAME;
  6140.        \uend record\n;
  6141.     \utype\n PERSON(SEX : GENDER) \uis\n
  6142.        \urecord\n
  6143.           NAME     : STRING(1 .. 20);
  6144.           BIRTH    : DATE;
  6145.           AGE      : INTEGER \urange\n 0 .. 130;
  6146.           VEHICLE  : CAR_NAME;
  6147.           \ucase\n SEX \uis\n
  6148.              \uwhen\n M => WIFE           : PERSON_NAME(SEX => F);
  6149.              \uwhen\n F => HUSBAND        : PERSON_NAME(SEX => M);
  6150.           \uend case\n;
  6151.        \uend record\n;
  6152.     MY_CAR, YOUR_CAR, NEXT_CAR : CAR_NAME; -- implicitly initialized with
  6153.                                               null value
  6154. 3.8.2    \uOperations of Access Types\n
  6155. The  basic  \voperations\v305. of an \vaccess type\v330. include the operations involved in
  6156. \vassignment\v502.,   \vallocators\v421.   for   the   access   type,   membership   tests,
  6157. qualification,   explicit   \vconversion\v419.,  and  the  \vliteral\v406.  null.   If  the
  6158. \vdesignated type\v330. is a type with \vdiscriminants\v305., the basic operations  include
  6159. the  selection  of the corresponding discriminants;  if the designated type
  6160. is  a  \vrecord  type\v325.,  they  include  the  selection  of  the  corresponding
  6161. components;   if  the  designated  type  is an \varray type\v321., they include the
  6162. formation of \vindexed components\v402. and slices;  if the designated  type  is  a
  6163. \vtask   type\v901.,   they  include  selection  of  entries  and  entry  families.
  6164. Furthermore, the basic operations  include  the  formation  of  a  \vselected\v404.
  6165. \vcomponent\v404. with the \vreserved word\v404. all (see 4.1.3).
  6166. If  the  designated type is an array type, the basic operations include the
  6167. \vattributes\v405. that have the \vattribute  designators\v405.  FIRST,  LAST,  RANGE,  and
  6168. LENGTH  (likewise,  the  attribute designators of the N-th dimension).  The
  6169. prefix of each of these attributes must be a  value  of  the  access  type.
  6170. These  attributes yield the corresponding characteristics of the designated
  6171. \vobject\v303. (see 3.6.2).
  6172. If the designated type is a task type, the  \vbasic  operations\v308.  include  the
  6173. attributes that have the attribute designators TERMINATED and CALLABLE (see
  6174. 9.9).  The prefix of each of these attributes must be a value of the access
  6175. type.   These  attributes  yield  the  corresponding characteristics of the
  6176. designated task objects.
  6177. In addition, the  attribute  T'BASE  (see  3.3.3)  and  the  representation
  6178. attributes T'SIZE and T'STORAGE_SIZE (see 13.7.2) are defined for an access
  6179. type  or subtype T;  the attributes A'SIZE and A'ADDRESS are defined for an
  6180. access object A (see 13.7.2).
  6181. Besides the basic operations, the operations of an access type include  the
  6182. predefined comparison for equality and inequality.
  6183. 3.9  \uDeclarative Parts\n
  6184. A declarative part contains declarative items (possibly none).
  6185.     declarative_part ::=
  6186.        {basic_declarative_item} {later_declarative_item}
  6187.     basic_declarative_item ::= basic_declaration
  6188.        | representation_clause | use_clause
  6189.     later_declarative_item ::= \ubody\n
  6190.        | subprogram_declaration | package_declaration
  6191.        | task_declaration       | generic_declaration
  6192.        | use_clause             | generic_instantiation
  6193.     \ubody\n ::= proper_body | body_stub
  6194.     proper_body ::= subprogram_body | package_body | task_body
  6195. The  elaboration  of  a declarative part consists of the elaboration of the
  6196. declarative items, if any, in the order in which  they  are  given  in  the
  6197. declarative  part.  After its elaboration, a declarative item is said to be
  6198. elaborated.  Prior to the completion of its elaboration  (including  before
  6199. the elaboration), the declarative item is not yet elaborated.
  6200. For  several  forms  of declarative item, the language rules (in particular
  6201. \vscope\v802. and \vvisibility\v803. rules) are  such  that  it  is  either  impossible  or
  6202. illegal  to  use  an  entity before the elaboration of the declarative item
  6203. that declares this entity.  For example, it is not possible to use the name
  6204. of a \vtype\v305. for an object declaration if the corresponding  type  declaration
  6205. is  not  yet  elaborated.   In the case of bodies, the following checks are
  6206. performed:
  6207.   -  For a \vsubprogram call\v606., a check is made that the body of the subprogram
  6208.      is already elaborated.
  6209.   -  For the \vactivation\v903. of a task, a check is made that  the  body  of  the
  6210.      corresponding task unit is already elaborated.
  6211.   -  For the \vinstantiation\v1206. of a generic unit that has a body,  a  check  is
  6212.      made that this body is already elaborated.
  6213. The exception \vPROGRAM_ERROR\v1101. is raised if any of these checks fails.
  6214. If  a subprogram declaration, a package declaration, a task declaration, or
  6215. a generic declaration is a declarative item of a  given  declarative  part,
  6216. then  the  body  (if  there  is  one)  of  the program unit declared by the
  6217. declarative item must itself be a declarative item of this declarative part
  6218. (and must appear later).  If the body is a body  stub,  then  a  separately
  6219. compiled  subunit  containing the corresponding proper body is required for
  6220. the program unit (see 10.2).
  6221. 4.      \u Names and Expressions\n
  6222. The rules applicable to the different forms of name and expression, and  to
  6223. their evaluation, are given in this chapter.
  6224. More details:
  6225.  4.1    \vNames\v401.
  6226.  4.2    \vLiterals\v406.
  6227.  4.3    \vAggregates\v407.
  6228.  4.4    \vExpressions\v410.
  6229.  4.5    \vOperators and Expression Evaluation\v411.
  6230.  4.6    \vType Conversions\v419.
  6231.  4.7    \vQualified Expressions\v420.
  6232.  4.8    \vAllocators\v421.
  6233.  4.9    \vStatic Expressions  and Static Subtypes\v422.
  6234.  4.10   \vUniversal Expression\v423.
  6235. 4.1  \uNames\n
  6236. Names   can  denote  declared  entities,  whether  declared  explicitly  or
  6237. implicitly (see 3.1).  Names can also denote objects \vdesignated\v330.  by  access
  6238. values;   subcomponents  and \vslices\v403. of objects and values;  single entries,
  6239. \ventry\v905. families, and entries in families of  entries.   Finally,  names  can
  6240. denote \vattributes\v405. of any of the foregoing.
  6241.     name ::= simple_name
  6242.        | character_literal  | operator_symbol
  6243.        | \vindexed_component\v402.  | slice
  6244.        | \vselected_component\v404. | attribute
  6245.     simple_name ::= identifier
  6246.     prefix ::= name | function_call
  6247. A  simple  name  for an \ventity\v301. is either the \videntifier\v203. associated with the
  6248. entity by its \vdeclaration\v301., or another identifier associated with the entity
  6249. by a \vrenaming declaration\v805..
  6250. Certain forms  of  name  (indexed  and  selected  \vcomponents\v305.,  slices,  and
  6251. attributes)  include a prefix that is either a name or a \vfunction call\v606..  If
  6252. the \vtype\v305. of a prefix is an \vaccess type\v330., then the prefix must not be a  name
  6253. that denotes a \vformal parameter\v601. of \vmode\v601. out or a \vsubcomponent\v305. thereof.
  6254. If  the  prefix  of  a  name  is  a  function call, then the name denotes a
  6255. component, a slice, an attribute, an entry, or an \ventry family\v905.,  either  of
  6256. the  result  of the function call, or (if the result is an \vaccess value\v330.) of
  6257. the \vobject\v303. designated by the result.
  6258. A prefix is said to be appropriate for a type in either  of  the  following
  6259. cases:
  6260.   -  The type of the prefix is the type considered.
  6261.   -  The type of the prefix is an access type whose \vdesignated type\v330. is  the
  6262.      type considered.
  6263. The  \vevaluation\v411.  of a name determines the entity denoted by the name.  This
  6264. evaluation has no other effect  for  a  name  that  is  a  simple  name,  a
  6265. \vcharacter literal\v207., or an \voperator symbol\v601..
  6266. The  evaluation  of a name that has a prefix includes the evaluation of the
  6267. prefix, that is, of the corresponding name or function call.  If  the  type
  6268. of  the prefix is an access type, the evaluation of the prefix includes the
  6269. determination of the object designated by the corresponding  access  value;
  6270. the  \vexception  CONSTRAINT_ERROR\v1101.  is raised if the value of the prefix is a
  6271. \vnull access value\v330., except in the case of the  prefix  of  a  representation
  6272. attribute (see 13.7.2).
  6273. Examples of simple names:
  6274.     PI      --  the simple name of a number               (see 3.2.2)
  6275.     LIMIT   --  the simple name of a constant             (see 3.2.1)
  6276.     COUNT   --  the simple name of a scalar variable      (see 3.2.1)
  6277.     BOARD   --  the simple name of an array variable      (see 3.6.1)
  6278.     MATRIX  --  the simple name of a type                 (see 3.6)
  6279.     RANDOM  --  the simple name of a function             (see 6.1)
  6280.     ERROR   --  the simple name of an exception           (see 11.1)
  6281. More details:
  6282.  4.1.1  \vIndexed Components\v402.
  6283.  4.1.2  \vSlices\v403.
  6284.  4.1.3  \vSelected Components\v404.
  6285.  4.1.4  \vAttributes\v405.
  6286. 4.1.1  \uIndexed Components\n
  6287. An  indexed \vcomponent\v305. denotes either a \vcomponent of an array\v321. or an \ventry\v905. in
  6288. a family of entries.
  6289.     indexed_component ::= prefix(expression {, expression})
  6290. In the case of a component of an array, the prefix must be \vappropriate  for\v401.
  6291. \van array type\v401..  The \vexpressions\v410. specify the \vindex\v321. values for the component;
  6292. there  must  be  one  such  expression for each index position of the \varray\v321.
  6293. \vtype\v321..  In the case of an entry in a family of entries, the prefix must be a
  6294. \vname\v401. that denotes an  \ventry family\v905. of a \vtask  object\v902.,  and  the  expression
  6295. (there  must  be  exactly one) specifies the index value for the individual
  6296. entry.
  6297. Each expression must be of the type of the corresponding  index.   For  the
  6298. \vevaluation\v411.  of  an  indexed  component,  the prefix and the expressions are
  6299. evaluated \vin some order\v108. that is not defined by the language.  The exception
  6300. \vCONSTRAINT_ERROR\v1101. is raised if an index value does not belong to  the  range
  6301. of the corresponding index of the prefixing array or entry family.
  6302. Examples of indexed components:
  6303.  MY_SCHEDULE(SAT)     --  a component of a one-dimensional array (s. 3.6.1)
  6304.  PAGE(10)             --  a component of a one-dimensional array (see 3.6)
  6305.  BOARD(M, J + 1)      --  a component of a two-dimensional array (s. 3.6.1)
  6306.  PAGE(10)(20)         --  a component of a component             (see 3.6)
  6307.  REQUEST(MEDIUM)      --  an entry in a family of entries        (see 9.5)
  6308.  NEXT_FRAME(L)(M, N)  --  a component of a \vfunction call\v606.         (see 6.1)
  6309. Notes on the \uExamples:\n
  6310. Distinct notations are used for components of multidimensional arrays (such
  6311. as  BOARD) and arrays of arrays (such as PAGE).  The components of an array
  6312. of arrays are arrays and  can  therefore  be  indexed.   Thus  PAGE(10)(20)
  6313. denotes  the 20th component of PAGE(10).  In the last example NEXT_FRAME(L)
  6314. is  a  function  call  returning  an  access  value  which   designates   a
  6315. two-dimensional array.
  6316. 4.1.2  \uSlices\n
  6317. A slice denotes a one-dimensional \varray\v321. formed by a sequence of consecutive
  6318. \vcomponents\v305.  of  a  one-dimensional  array.   A  slice  of  a  \vvariable\v303. is a
  6319. variable;  a slice of a \vconstant\v303. is a constant;  a slice of a  value  is  a
  6320. value.
  6321.     slice ::= prefix(\vdiscrete_range\v321.)
  6322. The \vprefix\v401. of a slice must be \vappropriate for a one-dimensional array type\v401..
  6323. The  \vtype\v305.  of the slice is the \vbase type\v305. of this \varray type\v321..  \vThe bounds of\v322.
  6324. \vthe discrete range\v322. define those of the slice and must be of the type of the
  6325. \vindex\v321.;  the slice is a null slice denoting a \vnull  array\v322.  if  the  discrete
  6326. range is a \vnull range\v310..
  6327. For  the  \vevaluation\v411. of a \vname\v401. that is a slice, the prefix and the discrete
  6328. range are evaluated in some order that is not defined by the language.  The
  6329. \vexception CONSTRAINT_ERROR\v1101. is raised by the evaluation of  a  slice,  other
  6330. than  a  null  slice,  if  any of the bounds of the discrete range does not
  6331. belong to the \vindex range\v321. of the prefixing array.  (The bounds  of  a  null
  6332. slice need not \vbelong to the subtype\v305. of the index.)
  6333. Examples of slices:
  6334.   STARS(1 .. 15)        --  a slice of 15 characters       (see 3.6.3)
  6335.   PAGE(10 .. 10 + SIZE) --  a slice of 1 + SIZE components (s. 3.6 & 3.2.1)
  6336.   PAGE(L)(A .. B)       --  a slice of the array PAGE(L)   (see 3.6)
  6337.   STARS(1 .. 0)         --  a null slice                   (see 3.6.3)
  6338.   MY_SCHEDULE(WEEKDAY)  --  bounds given by subtype        (s. 3.6 & 3.5.1)
  6339.   STARS(5 .. 15)(K)     --  same as STARS(K)               (see 3.6.3)
  6340.                         --  provided that K is in 5 .. 15
  6341. \uNotes:\n
  6342. For  a  one-dimensional  array  A,  the  name  A(N  .. N) is a slice of one
  6343. component;  its type is the base type of A.  On the other hand, A(N)  is  a
  6344. component of the array A and has the corresponding component type.
  6345. 4.1.3  \uSelected Components\n
  6346. Selected  components  are  used to denote \vrecord components\v325., entries, entry
  6347. families, and objects \vdesignated\v330. by \vaccess values\v330.; they are  also  used  as
  6348. expanded names as described below.
  6349.     selected_component ::= prefix.selector
  6350.     selector ::= simple_name
  6351.        | \vcharacter_literal\v207. | Operator_symbol | \uall\n
  6352. The  following  four  forms  of  selected  components  are used to denote a
  6353. \vdiscriminant\v305., a record component, an \ventry\v905., or an \vobject\v303. designated  by  an
  6354. access value:
  6355. (a)  A discriminant:
  6356.      The  selector  must  be  a  simple  name denoting a discriminant of an
  6357.      object or value.  The \vprefix\v401. must be \vappropriate for the type\v401. of  this
  6358.      object or value.
  6359. (b)  A \vcomponent of a record\v325.:
  6360.      The  selector  must  be a \vsimple name\v401. denoting a component of a record
  6361.      object or value.  The prefix must be appropriate for the type of  this
  6362.      object or value.
  6363.      For  a  component of a \vvariant\v328., a check is made that the values of the
  6364.      discriminants are such  that  the  record  has  this  component.   The
  6365.      exception \vCONSTRAINT_ERROR\v1101. is raised if this check fails.
  6366. (c)  A single entry or an \ventry family\v905. of a \vtask\v900.:
  6367.      The selector must be a simple name denoting a single entry or an entry
  6368.      family of a task.  The prefix must be appropriate for the type of this
  6369.      task.
  6370. (d)  An object designated by an access value:
  6371.      The  selector  must be the \vreserved word\v211. \uall\n.  The value of the prefix
  6372.      must belong to an \vaccess type\v330..
  6373. A selected component of one  of  the  remaining  two  forms  is  called  an
  6374. expanded  name.   In each case the selector must be either a simple name, a
  6375. character literal, or an \voperator symbol\v601..  A \vfunction call\v606. is  not  allowed
  6376. as the prefix of an expanded name.  An expanded name can denote:
  6377. (e)  An \ventity\v301. declared in the \vvisible part\v328. of a \vpackage\v700.:
  6378.      The  prefix  must denote the package.  The selector must be the simple
  6379.      name, character literal, or \voperator\v411. symbol of the entity.
  6380. (f)  An  entity  whose  \vdeclaration\v301.  \voccurs  immediately\v801.  within  a   named
  6381.      construct:
  6382.      The  prefix  must  denote a construct that is either a \vprogram unit\v600., a
  6383.      \vblock statement\v507., a \vloop statement\v506., or an  \vaccept  statement\v905..   In  the
  6384.      case of an accept statement, the prefix must be either the simple name
  6385.      of  the  entry or entry family, or an expanded name ending with such a
  6386.      simple name (that is, no \vindex\v321. is allowed).  The selector must be  the
  6387.      simple  name, character literal, or operator symbol of an entity whose
  6388.      declaration occurs immediately within the construct.
  6389.      This form of expanded name is only allowed within the construct itself
  6390.      (including the body and any \vsubunits\v1004., in the case of a program  unit).
  6391.      A  name  declared  by  a  \vrenaming  declaration\v805.  is not allowed as the
  6392.      prefix.  If the prefix is the name of a \vsubprogram\v600. or accept statement
  6393.      and if there is more than one visible enclosing subprogram  or  accept
  6394.      statement  of this name, the expanded name is ambiguous, independently
  6395.      of the selector.
  6396. If, according to the \vvisibility\v803. rules,  there  is  at  least  one  possible
  6397. interpretation  of  the  prefix  of  a selected component as the name of an
  6398. enclosing subprogram or accept statement,  then  the  only  interpretations
  6399. considered  are those of rule (f), as expanded names (no interpretations of
  6400. the prefix as a function call are then considered).
  6401. The evaluation of  a  name  that  is  a  selected  component  includes  the
  6402. evaluation of the prefix.
  6403. Examples of selected components:
  6404.   TOMORROW.MONTH     --  a record component                    (see 3.7)
  6405.   NEXT_CAR.OWNER     --  a record component                    (see 3.8.1)
  6406.   NEXT_CAR.OWNER.AGE --  a record component                    (see 3.8.1)
  6407.   WRITER.UNIT        --  a record component (a discriminant)   (see 3.7.3)
  6408.   MIN_CELL(H).VALUE  --  a record component of the result (see 6.1 & 3.8.1)
  6409.                      --  of the function call MIN_CELL(H)
  6410.   CONTROL.SEIZE      --  an entry of the task CONTROL     (see 9.1 and 9.2)
  6411.   POOL(K).WRITE      --  an entry of the task POOL(K)     (see 9.1 and 9.2)
  6412.   NEXT_CAR.\uall\n       --  the object designated by
  6413.                      --  the access \vvariable\v328. NEXT_CAR       (see 3.8.1)
  6414. Examples of expanded names:
  6415.   TABLE_MANAGER.INSERT --  a procedure of the visible part of a package
  6416.                            (see 7.5)
  6417.   KEY_MANAGER."<"      --  an operator of the visible part of a package
  6418.                            (see 7.4.2)
  6419.   DOT_PRODUCT.SUM      --  a variable declared in a \vprocedure body\v609.
  6420.   BUFFER.POOL          --  a variable declared in a task unit (see 9.12)
  6421.   BUFFER.READ          --  an entry of a task unit (see 9.12)
  6422.   SWAP.TEMP            --  a variable declared in a block statement (s.5.6)
  6423.   STANDARD.BOOLEAN     --  the name of a predefined type (see 8.6 and C)
  6424. Note:
  6425. For  a record with components that are other records, the above rules imply
  6426. that the simple name must be  given  at  each  level  for  the  name  of  a
  6427. subcomponent.   For  example, the name NEXT_CAR.OWNER.BIRTH.MONTH cannot be
  6428. shortened (NEXT_CAR.OWNER.MONTH is not allowed).
  6429. 4.1.4  Attributes
  6430. An attribute denotes a \vbasic operation\v308. of an entity given by a \vprefix\v401..
  6431.     attribute ::= prefix'attribute_designator
  6432.     attribute_designator ::= \vsimple_name\v401. [(\vuniversal_static_expression\v422.)]
  6433. The applicable attribute designators depend on the  prefix.   An  attribute
  6434. can  be  a  basic  operation delivering a value;  alternatively it can be a
  6435. function, a \vtype\v305., or a range.  The meaning of the prefix  of  an  attribute
  6436. must   be  determinable  independently  of  the  attribute  designator  and
  6437. independently of the fact that it is the prefix of an attribute.
  6438. The attributes defined by the language  are  summarized  in  Annex  A.   In
  6439. addition,  an implementation may provide implementation-defined attributes;
  6440. their description must be given in Appendix F.  The attribute designator of
  6441. any implementation-defined attribute must not be the same as  that  of  any
  6442. language-defined attribute.
  6443. The evaluation of a \vname\v401. that is an attribute consists of the evaluation of
  6444. the prefix.
  6445. \uNotes:\n
  6446. The attribute designators DIGITS, DELTA, and RANGE have the same identifier
  6447. as  a  \vreserved word\v211..  However, no confusion is possible since an attribute
  6448. designator is always  preceded  by  an  apostrophe.   The  only  predefined
  6449. attribute  designators  that  have  a  \vuniversal  expression\v423.  are those for
  6450. certain operations of array types (see 3.6.2).
  6451. Examples of attributes:
  6452.   COLOR'FIRST        -- minimum value of the enumeration type COLOR
  6453.                         (see 3.3.1 and 3.5)
  6454.   RAINBOW'BASE'FIRST -- same as COLOR'FIRST (see 3.3.2 and 3.3.3)
  6455.   REAL'DIGITS        -- precision of the type REAL (see 3.5.7 and 3.5.8)
  6456.   BOARD'LAST(2)      -- upper bound of the second dimension of BOARD
  6457.                         (see 3.6.1 and 3.6.2)
  6458.   BOARD'RANGE(1)     -- index range of the first dimension of BOARD
  6459.                         (see 3.6.1 and 3.6.2)
  6460.   POOL(K)'TERMINATED -- TRUE if task POOL(K) is terminated (see 9.2 & 9.9)
  6461.   DATE'SIZE          -- number of bits for records of type DATE
  6462.                         (see 3.7   and 13.7.2)
  6463.   MESSAGE'ADDRESS    -- address of the record variable MESSAGE
  6464.                         (see 3.7.2 and 13.7.2)
  6465. 4.2  \uLiterals\n
  6466. A literal is either a \vnumeric literal\v204., an \venumeration literal\v311., the  literal
  6467. null,  or  a  string  literal.   The  evaluation  of  a  literal yields the
  6468. corresponding value.
  6469. Numeric literals are  the  literals  of  the  \vtypes\v305.  \vuniversal_integer\v314.  and
  6470. \vuniversal_real\v316..   Enumeration literals include \vcharacter literals\v206. and yield
  6471. values of the corresponding enumeration types.  The literal null  yields  a
  6472. \vnull access value\v330. which \vdesignates\v330. no \vobjects\v303. at all.
  6473. A  string  literal  is  a  basic  operation  that  combines  a  sequence of
  6474. characters into a value of a one-dimensional \varray\v321.  of  a  \vcharacter  type\v312.;
  6475. the  bounds  of  this  array  are  determined  according  to  the rules for
  6476. positional array \vaggregates\v407. (see 4.3.2).  For a \vnull  string  literal\v330.,  the
  6477. upper  bound  is  the  predecessor,  as given by the PRED attribute, of the
  6478. lower bound.  The evaluation of a null \vstring literal\v208. raises the  exception
  6479. \vCONSTRAINT_ERROR\v1101.  if  the  lower  bound  does  not  have a predecessor (see
  6480. 3.5.5).
  6481. The type of a string literal and likewise the type of the literal null must
  6482. be determinable solely from the context  in  which  this  literal  appears,
  6483. excluding the literal itself, but using the fact that the literal null is a
  6484. value  of an \vaccess type\v330., and similarly that a string literal is a value of
  6485. a one-dimensional \varray type\v321. whose \vcomponent type\v305. is a character type.
  6486. The character literals corresponding to the  \vgraphic  characters\v201.  contained
  6487. within  a string literal must be visible at the place of the string literal
  6488. (although these characters themselves are not used to determine the type of
  6489. the string literal).
  6490. \uExamples:\n
  6491.     3.14159_26536  --  a \vreal literal\v204.
  6492.     1_345          --  an \vinteger literal\v204.
  6493.     CLUBS          --  an enumeration literal
  6494.     'A'            --  a character literal
  6495.     "SOME TEXT"    --  a string literal
  6496. 4.3  \uAggregates\n
  6497. An  aggregate  is  a  \vbasic operation\v308. that combines \vcomponent\v305. values into a
  6498. \vcomposite value\v305. of a \vrecord\v325. or \varray type\v321..
  6499.     aggregate ::=
  6500.        (component_association {, component_association})
  6501.     component_association ::=
  6502.        [\vchoice\v328. {| choice} => ] \vexpression\v410.
  6503. Each  component  association  associates  an  expression  with   components
  6504. (possibly  none).   A  component  association  is  said  to be named if the
  6505. components are specified explicitly by choices;  it is otherwise said to be
  6506. positional.  For  a  positional  association,  the  (single)  component  is
  6507. implicitly  specified  by  position,  in  the  order  of  the corresponding
  6508. component declarations for record components,  in  \vindex\v321.  order  for  array
  6509. components.
  6510. Named  associations  can  be  given  in  any  order  (except for the choice
  6511. others), but if both positional and named associations are used in the same
  6512. aggregate, then positional associations must occur first, at  their  normal
  6513. position.   Hence  once  a  named  association  is  used,  the  rest of the
  6514. aggregate must use only named associations.  Aggregates containing a single
  6515. component association must always be given  in  named  notation.   Specific
  6516. rules  concerning  component  associations  exist for \vrecord aggregates\v408. and
  6517. \varray aggregates\v409..
  6518. Choices in component associations have the same syntax as in \vvariant  parts\v328.
  6519. (see 3.7.3).  A choice that is a component \vsimple name\v401. is only allowed in a
  6520. record  aggregate.   For a component association, a choice that is a \vsimple\v410.
  6521. \vexpression\v410. or a \vdiscrete range\v321. is only allowed in an  array  aggregate;   a
  6522. choice  that  is  a  simple  expression  specifies  the  component  at  the
  6523. corresponding index  value;   similarly  a  discrete  range  specifies  the
  6524. components  at  the  index  values in the range.  The choice others is only
  6525. allowed in a component association if the association appears last and  has
  6526. this single choice;  it specifies all remaining components, if any.
  6527. Each  component  of  the  value defined by an aggregate must be represented
  6528. once and only once in the aggregate.  Hence each aggregate must be complete
  6529. and a given component is not allowed to  be  specified  by  more  than  one
  6530. choice.
  6531. The  \vtype\v305.  of  an aggregate must be determinable solely from the context in
  6532. which the aggregate appears, excluding the aggregate itself, but using  the
  6533. fact  that  this  type  must  be composite and not limited.  The type of an
  6534. aggregate in turn determines the required type for each of its  components.
  6535. \uNotes:\n
  6536. The  above  rule implies that the determination of the type of an aggregate
  6537. cannot use any information from within the aggregate.  In particular,  this
  6538. determination  cannot  use  the  type  of  the  expression  of  a component
  6539. association, or the form or the type of a choice.  An aggregate can  always
  6540. be  distinguished  from  an  expression enclosed by parentheses:  this is a
  6541. consequence of the fact that named notation is required  for  an  aggregate
  6542. with a single component.
  6543. More details:
  6544.  4.3.1  \vRecord Aggregates\v408.
  6545.  4.3.2  \vArray Aggregates\v409.
  6546. 4.3.1  \uRecord Aggregates\n
  6547. If the \vtype\v305. of an \vaggregate\v407. is a \vrecord type\v325., the \vcomponent names\v325. given  as
  6548. \vchoices\v328.  must  denote  components  (including  discriminants) of the record
  6549. type.  If the choice others is given as a choice of a record aggregate,  it
  6550. must  represent  at  least one component.  A \vcomponent association\v407. with the
  6551. choice others or  with  more  than  one  choice  is  only  allowed  if  the
  6552. represented  components  are  all  of  the  same type.  The \vexpression\v410. of a
  6553. component  association  must  have  the  type  of  the  associated   \vrecord\v325.
  6554. \vcomponents\v325..
  6555. The  value specified for a \vdiscriminant\v305. that governs a \vvariant part\v328. must be
  6556. given by a  \vstatic  expression\v422.  (note  that  this  value  determines  which
  6557. dependent components must appear in the record value).
  6558. For  the  evaluation  of  a  record aggregate, the expressions given in the
  6559. component associations are \vevaluated\v411. \vin some order\v108. that is not  defined  by
  6560. the  language.  The expression of a named association is evaluated once for
  6561. each associated component.   A  check  is  made  that  the  value  of  each
  6562. \vsubcomponent\v305.  of the aggregate belongs to the \vsubtype\v307. of this subcomponent.
  6563. The \vexception CONSTRAINT_ERROR\v1101. is raised if this check fails.
  6564. Example of a record aggregate with positional associations:
  6565.     (4, JULY, 1776)                      --  see 3.7
  6566. Examples of record aggregates with named associations:
  6567.     (DAY => 4, MONTH => JULY, YEAR => 1776)
  6568.     (MONTH => JULY, DAY => 4, YEAR => 1776)
  6569.     (DISK, CLOSED, TRACK => 5, CYLINDER => 12)       --  see 3.7.3
  6570.     (UNIT => DISK, STATUS => CLOSED, CYLINDER => 9, TRACK => 1)
  6571. Example of component association with several choices:
  6572.     (VALUE => 0, SUCC|PRED => \unew\n CELL'(0, \unull\n, \unull\n))   --  see 3.8.1
  6573.     --  The \vallocator\v421. is evaluated twice:  SUCC and PRED designate
  6574.         different cells
  6575. Note:
  6576. For an aggregate with positional associations, discriminant  values  appear
  6577. first  since  the  \vdiscriminant  part\v326.  is  given  first  in the record type
  6578. declaration;  they must be in the same order as in the  discriminant  part.
  6579. 4.3.2  \uArray Aggregates\n
  6580. If  the  \vtype\v305.  of  an  \vaggregate\v407. is a one-dimensional \varray type\v321., then each
  6581. \vchoice\v328. must specify values of the \vindex type\v321., and the  \vexpression\v410.  of  each
  6582. \vcomponent association\v407. must be of the \vcomponent type\v305..
  6583. If  the  type  of  an  aggregate  is  a  multidimensional  array  type,  an
  6584. n-dimensional aggregate is written as a one-dimensional aggregate, in which
  6585. the expression specified for each component association is  itself  written
  6586. as  an  (n-1)-dimensional  aggregate  which  is called a subaggregate;  the
  6587. \vindex subtype\v321. of the one-dimensional aggregate is given by the first  index
  6588. position  of the array type.  The same rule is used to write a subaggregate
  6589. if it is again  multidimensional,  using  successive  index  positions.   A
  6590. string literal is allowed in a multidimensional aggregate at the place of a
  6591. one-dimensional  array  of  a  character  type.  In what follows, the rules
  6592. concerning array aggregates are  formulated  in  terms  of  one-dimensional
  6593. aggregates.
  6594. Apart from a final component association with the single choice others, the
  6595. rest  (if  any) of the component associations of an array aggregate must be
  6596. either all positional or all  named.   A  \vnamed  association\v407.  of  an  array
  6597. aggregate  is only allowed to have a choice that is not static, or likewise
  6598. a choice that is a null range, if the aggregate includes a single component
  6599. association and this component association has a single choice.  An  others
  6600. choice is static if the applicable index \vconstraint\v305. is static.
  6601. The  bounds  of an array aggregate that has an others choice are determined
  6602. by the applicable \vindex constraint\v322..  An others choice is  only  allowed  if
  6603. the  aggregate  appears in one of the following contexts (which defines the
  6604. applicable index constraint):
  6605. (a)  The aggregate is an \vactual parameter\v607., a generic actual parameter,  the
  6606.      result  expression  of  a  \vfunction\v609., or the expression that follows an
  6607.      \vassignment  compound  delimiter\v502..   Moreover,  the   subtype   of   the
  6608.      corresponding  formal  parameter,  generic  \vformal parameter\v601., function
  6609.      result, or \vobject\v302. is a \vconstrained array subtype\v321..
  6610.      For an aggregate that appears  in  such  a  context  and  contains  an
  6611.      association  with an others choice, named associations are allowed for
  6612.      other associations only in the case of a (nongeneric) actual parameter
  6613.      or function result.  If the aggregate  is  a  multidimensional  array,
  6614.      this restriction also applies to each of its subaggregates.
  6615. (b)  The aggregate is the operand of a \vqualified expression\v420. whose type mark
  6616.      denotes a constrained array subtype.
  6617. (c)  The aggregate is the expression of the  component  association  of  an
  6618.      enclosing  (array  or  record) aggregate.  Moreover, if this enclosing
  6619.      aggregate is a multidimensional array aggregate then it is  itself  in
  6620.      one of these three contexts.
  6621. The  bounds  of  an array aggregate that does not have an others choice are
  6622. determined as follows.  For an aggregate that has named  associations,  the
  6623. bounds  are  determined  by  the smallest and largest choices given.  For a
  6624. positional aggregate, the lower bound is determined by the applicable index
  6625. constraint if the aggregate appears in one of the contexts (a) through (c);
  6626. otherwise, the lower bound is  given  by  S'FIRST  where  S  is  the  index
  6627. subtype;   in  either  case, the upper bound is determined by the number of
  6628. components.
  6629. The evaluation of an array aggregate that is not a subaggregate proceeds in
  6630. two steps.  First, the choices of this aggregate and of its  subaggregates,
  6631. if  any,  are  \vevaluated\v411. \vin some order\v108. that is not defined by the language.
  6632. Second,  the  expressions  of  the  component  associations  of  the  array
  6633. aggregate  are evaluated in some order that is not defined by the language;
  6634. the expression of a named association is evaluated once for each associated
  6635. component.  The evaluation of a subaggregate consists of this  second  step
  6636. (the  first step is omitted since the choices have already been evaluated).
  6637. For the evaluation of an aggregate that is not a \vnull  array\v322.,  a  check  is
  6638. made  that  the index values defined by choices belong to the corresponding
  6639. index subtypes, and also  that  the  value  of  each  \vsubcomponent\v305.  of  the
  6640. aggregate   belongs   to   the   subtype  of  this  subcomponent.   For  an
  6641. n-dimensional  multidimensional  aggregate,  a  check  is  made  that   all
  6642. (n-1)-dimensional  subaggregates  have  the  same  bounds.   The  exception
  6643. \vCONSTRAINT_ERROR\v1101. is raised if any of these checks fails.
  6644. Note:
  6645. The allowed contexts for an array aggregate including an others choice  are
  6646. such  that  the  bounds  of  such  an  aggregate  are always known from the
  6647. context.
  6648. Examples of array aggregates with \vpositional associations\v407.:
  6649.     (7, 9, 5, 1, 3, 2, 4, 8, 6, 0)
  6650.     TABLE'(5, 8, 4, 1, others => 0)  --  see 3.6
  6651. Examples of array aggregates with named associations:
  6652.     (1 .. 5 => (1 .. 8 => 0.0))   --  two-dimensional
  6653.     (1 .. N => \unew\n CELL)          --  N new cells, in particular for N =  0
  6654.     TABLE'(2 | 4 | 10 => 1, \uothers\n => 0)
  6655.     SCHEDULE'(MON .. FRI => TRUE,  \uothers\n => FALSE)  --  see 3.6
  6656.     SCHEDULE'(WED | SUN  => FALSE, \uothers\n => TRUE)
  6657. Examples of two-dimensional array aggregates:
  6658.     -- Three aggregates for the same value of type MATRIX (see 3.6):
  6659.  ((1.1, 1.2, 1.3), (2.1, 2.2, 2.3))
  6660.  (1 => (1.1, 1.2, 1.3), 2 => (2.1, 2.2, 2.3))
  6661.  (1 => (1 => 1.1, 2 => 1.2, 3 => 1.3), 2 => (1 => 2.1, 2 => 2.2, 3 => 2.3))
  6662. Examples of aggregates as initial values:
  6663.   A : TABLE := (7, 9, 5, 1, 3, 2, 4, 8, 6, 0);        -- A(1)=7, A(10)= 8
  6664.   B : TABLE := TABLE'(2 | 4 | 10 => 1, \uothers\n => 0);  -- B(1)=0, B(10)=1
  6665.   C : \uconstant\n MATRIX := (1 .. 5 => (1 .. 8 => 0.0));
  6666.                                                  -- C'FIRST(1)=1, C'LAST(2)=8
  6667.   D : BIT_VECTOR(M .. N) := (M .. N => TRUE);  -- see 3.6
  6668.   E : BIT_VECTOR(M .. N) := (\uothers\n => TRUE);
  6669.   F : STRING(1 .. 1) := (1 => 'F');
  6670.                                   -- a one component aggregate: same as "F"
  6671. 4.4  \uExpressions\n
  6672. An expression is a formula that defines the computation of a value.
  6673.     expression ::=
  6674.          \vrelation\v412. {and relation} | relation {and then relation}
  6675.        | relation {or relation}  | relation {or else relation}
  6676.        | relation {xor relation}
  6677.     relation ::=
  6678.          simple_expression [\vrelational_operator\v411. simple_expression]
  6679.        | simple_expression [not] in \vrange\v310.
  6680.        | simple_expression [not] in \vtype_mark\v307.
  6681.     simple_expression ::= [\vunary_adding_operator\v411.]
  6682.                           term {\vbinary_adding_operator\v411. term}
  6683.     term ::= factor {\vmultiplying_operator\v411. factor}
  6684.     factor ::= primary [** primary] | \uabs\n primary | not primary
  6685.     primary ::=
  6686.      \vnumeric_literal\v204. | \unull\n | \vaggregate\v407. | \vstring_literal\v208. | \vname\v401. | \vallocator\v421.
  6687.    | \vfunction_call\v606. | \vtype_conversion\v419. | \vqualified_expression\v420. | (expression)
  6688. Each primary has a value and a \vtype\v305..  The only names allowed  as  primaries
  6689. are  named  numbers;   \vattributes\v405.  that  yield  values;  and names denoting
  6690. \vobjects\v302. (the value of such a  primary  is  the  value  of  the  object)  or
  6691. denoting  values.   Names that denote formal parameters of mode out are not
  6692. allowed as primaries;  names of their subcomponents are only allowed in the
  6693. case of discriminants.
  6694. The type of an expression depends only on the type of its constituents  and
  6695. on  the  \voperators\v411. applied;  for an overloaded constituent or operator, the
  6696. determination of  the  constituent  type,  or  the  identification  of  the
  6697. appropriate   operator,  depends  on  the  context.   For  each  predefined
  6698. operator, the operand and \vresult types\v601. are given in section 4.5.
  6699. Examples of primaries:
  6700.     4.0                --  \vreal literal\v204.
  6701.     PI                 --  \vnamed number\v302.
  6702.     (1 .. 10 => 0)     --  \varray aggregate\v409.
  6703.     SUM                --  \vvariable\v303.
  6704.     INTEGER'LAST       --  attribute
  6705.     SINE(X)            --  function call
  6706.     COLOR'(BLUE)       --  qualified expression
  6707.     REAL(M*N)          --  conversion
  6708.     (LINE_COUNT + 10)  --  parenthesized expression
  6709. Examples of expressions:
  6710.     VOLUME                  -- primary
  6711.     \unot\n DESTROYED           -- factor
  6712.     2*LINE_COUNT            -- term
  6713.     -4.0                      -- simple expression
  6714.     -4.0 + A                  -- simple expression
  6715.     B**2 - 4.0*A*C            -- simple expression
  6716.     PASSWORD(1 .. 3) = "BWV"    -- relation
  6717.     COUNT \uin\n SMALL_INT          -- relation
  6718.     COUNT \unot in\n SMALL_INT      -- relation
  6719.     INDEX = 0 \uor\n ITEM_HIT         -- expression
  6720.     (COLD \uand\n SUNNY) \uor\n WARM      -- expression (parentheses are required)
  6721.     A**(B**C)                     -- expression (parentheses are required)
  6722. 4.5  \uOperators and Expression Evaluation\n
  6723. The   language  defines  the  following  six  classes  of  operators.   The
  6724. corresponding operator symbols (except /=), and only those, can be used  as
  6725. \vdesignators\v601.  in declarations of functions for user-defined operators.  They
  6726. are given in the order of increasing precedence.
  6727.     logical_operator             ::=  \uand\n | \uor\n  | \uxor\n
  6728.     relational_operator          ::=  =   | /=  | <   | <= | > | >=
  6729.     binary_adding_operator       ::=  +   | -   | &
  6730.     unary_adding_operator        ::=  +   | -
  6731.     multiplying_operator         ::=  *   | /   | \umod\n | \urem\n
  6732.     highest_precedence_operator  ::=  **  | \uabs\n | \unot\n
  6733. The \vshort-circuit control\v411.  forms  and  then  and  or  else  have  the  same
  6734. precedence  as  logical operators.  The membership tests in and not in have
  6735. the same precedence as relational operators.
  6736. For a \vterm\v410., simple \vexpression\v410., \vrelation\v410., or expression, operators of higher
  6737. precedence are associated with their operands  before  operators  of  lower
  6738. precedence.   In  this  case,  for  a  sequence  of  operators  of the same
  6739. precedence level, the operators are associated in textual order  from  left
  6740. to right;  parentheses can be used to impose specific associations.
  6741. The  operands  of  a  \vfactor\v410.,  of  a  term, of a \vsimple expression\v410., or of a
  6742. relation, and the operands  of  an  expression  that  does  not  contain  a
  6743. short-circuit control form, are evaluated \vin some order\v108. that is not defined
  6744. by  the  language  (but  before application of the corresponding operator).
  6745. The right operand of a short-circuit control form is evaluated if and  only
  6746. if the left operand has a certain value (see 4.5.1).
  6747. For  each  form  of  type  declaration,  certain of the above operators are
  6748. predefined, that is, they are \vimplicitly declared\v301. by the type  declaration.
  6749. For  each  such  implicit operator declaration, the \vnames\v401. of the parameters
  6750. are LEFT and RIGHT for binary operators;  the single  parameter  is  called
  6751. RIGHT  for  unary adding operators and for the unary operators \uabs\n and \unot\n.
  6752. The effect of the predefined operators is explained  in  subsections  4.5.1
  6753. through 4.5.7.
  6754. The  predefined operations on \vinteger types\v314. either yield the mathematically
  6755. correct  result  or  raise  the  exception  \vNUMERIC_ERROR\v1101..   A   predefined
  6756. operation   that   delivers  a  result  of  an  integer  type  (other  than
  6757. \vuniversal_integer\v314.) can  only  raise  the  exception  NUMERIC_ERROR  if  the
  6758. mathematical  result is not a value of the type.  The predefined operations
  6759. on \vreal types\v316. yield results whose accuracy is defined in section 4.5.7.   A
  6760. predefined  operation  that  delivers  a  result of a real type (other than
  6761. \vuniversal_real\v316.) can only raise the exception NUMERIC_ERROR if the result is
  6762. not within the \vrange\v310. of the \vsafe numbers\v316.  of  the  type,  as  explained  in
  6763. section 4.5.7.
  6764. Examples of precedence:
  6765.     \unot\n SUNNY \uor\n WARM    --  same as (not SUNNY) or WARM
  6766.     X > 4.0 \uand\n Y > 0.0  --  same as (X > 4.0) \uand\n (Y > 0.0)
  6767.     -4.0*A**2            --  same as -(4.0 * (A**2))
  6768.     \uabs\n(1 + A) + B       --  same as (\uabs\n (1 + A)) + B
  6769.     Y**(-3)              --  parentheses are necessary
  6770.     A / B * C            --  same as (A/B)*C
  6771.     A + (B + C)          --  evaluate B + C before adding it to A
  6772. More details:
  6773.  4.5.1  \vLogical Operators and Short Circuit Control Forms\v412.
  6774.  4.5.2  \vRelational Operators and Membership Tests\v413.
  6775.  4.5.3  \vAdding Operators\v414.
  6776.  4.5.4  \vUnary Operators\v415.
  6777.  4.5.5  \vMultiplying Operators\v416.
  6778.  4.5.6  \vHighest Precedence Operations\v417.
  6779.  4.5.7  \vAccuracy of Operations with Real Operands\v418.
  6780. 4.5.1  \uLogical Operators and Short-circuit Control Forms\n
  6781. The following logical \voperators\v411. are predefined for any boolean \vtype\v305. and any
  6782. one-dimensional \varray type\v321. whose components are  of  a  \vboolean  type\v313.;   in
  6783. either case the two operands have the same type.
  6784. Operator  Operation              Operand type                 Result type
  6785. \uand\n     conjunction            any boolean type             same bool. type
  6786.                                array of boolean components  same array type
  6787. \uor\n      inclusive disjunction  any boolean type             same bool. type
  6788.                                array of boolean components  same array type
  6789. \uxor\n     exclusive disjunction  any boolean type             same bool. type
  6790.                                array of boolean components  same array type
  6791. The \voperations\v305. on arrays are performed on a component-by-component basis on
  6792. matching  components,  if  any (as for equality, see 4.5.2).  The bounds of
  6793. the resulting array are those of the left operand.  A check  is  made  that
  6794. for each component of the left operand there is a matching component of the
  6795. right operand, and vice versa.  The \vexception CONSTRAINT_ERROR\v1101. is raised if
  6796. this check fails.
  6797. The  short-circuit  control  forms and then and or else are defined for two
  6798. operands of a boolean type and deliver a result of the same type.  The left
  6799. operand of a short-circuit control form is always evaluated first.  If  the
  6800. left  operand  of an expression with the control form and then evaluates to
  6801. FALSE, the right operand is not evaluated and the value of  the  expression
  6802. is  FALSE.   If  the left operand of an expression with the control form or
  6803. else evaluates to TRUE, the right operand is not evaluated and the value of
  6804. the expression is TRUE.  If both operands are evaluated, and then  delivers
  6805. the same result as and, and or else delivers the same result as or.
  6806. Note:
  6807. The  conventional  meaning  of  the  logical operators is given by the fol-
  6808. lowing truth table:
  6809.     A        B       (A \uand\n B)    (A or B)    (A xor B)
  6810.     TRUE    TRUE     TRUE         TRUE        FALSE
  6811.     TRUE    FALSE    FALSE        TRUE        TRUE
  6812.     FALSE   TRUE     FALSE        TRUE        TRUE
  6813.     FALSE   FALSE    FALSE        FALSE       FALSE
  6814. Examples of logical operators:
  6815.     SUNNY \uor\n WARM
  6816.     FILTER(1 .. 10) \uand\n FILTER(15 .. 24)   --   see 3.6.1
  6817. Examples of short-circuit control forms:
  6818.     NEXT_CAR.OWNER /= \unull and then\n NEXT_CAR.OWNER.AGE > 25   -- see 3.8.1
  6819.     N = 0 \uor else\n A(N) = HIT_VALUE
  6820. 4.5.2  \uRelational Operators and Membership Tests\n
  6821. The  equality  and inequality \voperators\v411. are \vpredefined\v411. for any \vtype\v305. that is
  6822. not limited.  The other relational operators are the ordering  operators  <
  6823. (less  than),  <=  (less  than or equal), > (greater than), and >= (greater
  6824. than or equal).  The ordering operators   are  predefined  for  any  \vscalar\v310.
  6825. \vtype\v310.,  and  for  any  discrete \varray type\v321., that is, a one-dimensional array
  6826. type whose \vcomponents\v305. are  of  a  \vdiscrete  type\v310..   The  operands  of  each
  6827. predefined  relational operator have the same type.  The result type is the
  6828. \vpredefined type BOOLEAN\v313..
  6829. The relational operators have their conventional meaning:   the  result  is
  6830. equal  to  TRUE  if the corresponding relation is satisfied;  the result is
  6831. FALSE otherwise.  The inequality operator gives the complementary result to
  6832. the equality operator:  FALSE if equal, TRUE if not equal.
  6833.     Operator    \vOperation\v305.                 Operand type          Result type
  6834.     = /=        equality and inequality   any type              BOOLEAN
  6835.     < <= > >=   test for ordering         any scalar type       BOOLEAN
  6836.                                           discrete array type   BOOLEAN
  6837. Equality for the discrete types  is  equality  of  the  values.   For  real
  6838. operands  whose  values  are  nearly  equal,  the results of the predefined
  6839. relational operators are given in section 4.5.7.   Two  \vaccess  values\v330.  are
  6840. equal either if they \vdesignate\v330. the same \vobject\v303., or if both are equal to the
  6841. \vnull value\v330. of the access type.
  6842. For  two  array  values  or  two  record  values of the same type, the left
  6843. operand is equal to the right operand if and only if for each component  of
  6844. the  left  operand  there  is a matching component of the right operand and
  6845. vice versa;  and the values of matching components are equal, as  given  by
  6846. the  predefined  equality  operator for the component type.  In particular,
  6847. two \vnull arrays\v322. of the same type are always equal;  two \vnull records\v325. of the
  6848. same type are always equal.
  6849. For comparing two records of the same type, matching components  are  those
  6850. which have the same \vcomponent identifier\v325..
  6851. For  comparing  two  one-dimensional  arrays  of  the  same  type, matching
  6852. components are those (if any) whose index values  match  in  the  following
  6853. sense:   the lower bounds of the index \vranges\v310. are defined to match, and the
  6854. \vsuccessors\v315. of matching indices are defined to  match.   For  comparing  two
  6855. multidimensional  arrays,  matching components are those whose index values
  6856. match in successive index positions.
  6857. If equality is explicitly defined for a \vlimited type\v708., it does not extend to
  6858. \vcomposite  types\v305.  having  \vsubcomponents\v305.  of  the  limited  type   (explicit
  6859. definition of equality is allowed for such composite types).
  6860. The ordering operators <, <=, >, and >= that are defined for discrete array
  6861. types correspond to lexicographic order using the predefined order relation
  6862. of  the  \vcomponent  type\v305..   A null array is lexicographically less than any
  6863. array having at least one component.  In the case of  nonnull  arrays,  the
  6864. left  operand is lexicographically less than the right operand if the first
  6865. component of the left operand is less than that of  the  right;   otherwise
  6866. the  left  operand is lexicographically less than the right operand only if
  6867. their first components are equal and  the  tail  of  the  left  operand  is
  6868. lexicographically  less  than  that  of the right (the tail consists of the
  6869. remaining components beyond the first and can be null).
  6870. The membership tests in and not in  are  predefined  for  all  types.   The
  6871. result  type  is the predefined type BOOLEAN.  For a membership test with a
  6872. range, the \vsimple expression\v410. and the bounds of the range  must  be  of  the
  6873. same  scalar type;  for a membership test with a \vtype mark\v307., the type of the
  6874. simple expression must be the \vbase type\v305. of the type mark.   The  \vevaluation\v411.
  6875. of the membership test in yields the result TRUE if the value of the simple
  6876. expression  is  within  the  given  range,  or if this value \vbelongs to the\v305.
  6877. \vsubtype\v305. denoted by the given type mark;  otherwise this  evaluation  yields
  6878. the  result  FALSE (for a value of a real type, see 4.5.7).  The membership
  6879. test not in gives the complementary result to the membership test in.
  6880. \uExamples:\n
  6881.     X /= Y
  6882.     "" < "A" \uand\n "A" < "AA"     --  TRUE
  6883.     "AA" < "B" \uand\n "A" < "A  "  --  TRUE
  6884.     MY_CAR = \unull\n              -- true if MY_CAR has been set to null
  6885.                                   (see 3.8.1)
  6886.     MY_CAR = YOUR_CAR          -- true if we both share the same car
  6887.     MY_CAR.\uall\n = YOUR_CAR.\uall\n  -- true if the two cars are identical
  6888.     N \unot in\n 1 .. 10     -- range membership test
  6889.     TODAY \uin\n MON .. FRI  -- range membership test
  6890.     TODAY \uin\n WEEKDAY     -- subtype membership test (see 3.5.1)
  6891.     ARCHIVE \uin\n DISK_UNIT -- subtype membership test (see 3.7.3)
  6892. \uNotes:\n
  6893. No \vexception\v1100. is ever raised by a predefined relational  operator  or  by  a
  6894. membership  test,  but  an exception can be raised by the evaluation of the
  6895. operands.
  6896. If a \vrecord type\v325. has components that depend on discriminants, two values of
  6897. this type have matching components if and only if their  discriminants  are
  6898. equal.   Two  nonnull  arrays  have  matching components if and only if the
  6899. value of the attribute LENGTH(N) for each \vindex\v321. position N is the same  for
  6900. both.
  6901. 4.5.3  \uBinary Adding Operators\n
  6902. The binary adding \voperators\v411. + and -  are predefined for  any  \vnumeric  type\v310.
  6903. and  have  their  conventional  meaning.   The  catenation  operators & are
  6904. predefined for any one-dimensional \varray type\v321. that is not limited.
  6905.  +-Operator
  6906.  |   \vOperation\v305.  Left operand \vtype\v305.  Right operand type    Result type
  6907. +----------------------------------------------------------------------+
  6908. |+ |  addition |any numeric type  |same numeric type |same numeric type|
  6909. |  |           |                  |                  |                 |
  6910. |- |subtraction|any numeric type  |same numeric type |same numeric type|
  6911. |  |           |                  |                  |                 |
  6912. |& |catenation |any array type    |same array type   |same array type  |
  6913. |  |           |any array type    |the \vcomponent type\v305.|same array type  |
  6914. |  |           |the component type|any array type    |same array type  |
  6915. |  |           |the component type|the component type|any array type   |
  6916. +----------------------------------------------------------------------+
  6917. For \vreal types\v316., the accuracy of the result is  determined  by  the  operand
  6918. type (see 4.5.7).
  6919. If  both  operands are one-dimensional arrays, the result of the catenation
  6920. is a one-dimensional array whose length is the sum of the  lengths  of  its
  6921. operands,  and whose components comprise the components of the left operand
  6922. followed by the components of the right operand.  The lower bound  of  this
  6923. result is the lower bound of the left operand, unless the left operand is a
  6924. \vnull  array\v322.,  in  which  case  the  result  of  the catenation is the right
  6925. operand.
  6926. If either operand is of the component type of an array type, the result  of
  6927. the  catenation is given by the above rules, using in place of this operand
  6928. an array having this operand as its only component  and  having  the  lower
  6929. bound of the \vindex subtype\v321. of the array type as its lower bound.
  6930. The  \vexception  CONSTRAINT_ERROR\v1101. is raised by catenation if the upper bound
  6931. of the result exceeds the \vrange of the index subtype\v322., unless the result  is
  6932. a  null  array.   This  exception  is  also raised if any operand is of the
  6933. component type but has a value  that  does  not  belong  to  the  component
  6934. subtype.
  6935. \uExamples:\n
  6936.     Z + 0.1      --  Z must be of a real type
  6937.     "A" & "BCD"  --  catenation of two \vstring literals\v208.
  6938.     'A' & "BCD"  --  catenation of a \vcharacter literal\v207. and a string literal
  6939.     'A' & 'A'    --  catenation of two character literals
  6940. 4.5.4  \uUnary Adding Operators\n
  6941. The  unary adding \voperators\v411. + and - are predefined for any \vnumeric type\v310. and
  6942. have their conventional meaning.  For each of these operators, the  operand
  6943. and the result have the same \vtype\v305..
  6944.     Operator   Operation   Operand type       Result type
  6945.     +          identity    any numeric type   same numeric type
  6946.     -          negation    any numeric type   same numeric type
  6947. 4.5.5  \uMultiplying Operators\n
  6948. The operators * and / are predefined for any integer and any \vfloating point\v317.
  6949. \vtype\v317. and have their conventional meaning;  the operators mod  and  rem  are
  6950. predefined for any \vinteger type\v314..  For each of these operators, the operands
  6951. and  the  result  have  the  same \vbase type\v305..  For floating point types, the
  6952. accuracy of the result is determined by the operand type (see 4.5.7).
  6953.  Operator     Operation          Operand type           Result type
  6954.    *          multiplication     any integer type       same integer type
  6955.                                  any floating point     same floating point
  6956.                                  type                   type
  6957.    /          integer division   any integer type       same integer type
  6958.               floating division  any floating point     same floating point
  6959.                                  type                   type
  6960.   \nmod\n         modulus            any integer type       same integer type
  6961.   \urem\n         remainder          any integer type       same integer type
  6962. Integer division and remainder are defined by the relation
  6963.     A = (A/B)*B + (A \urem\n B)
  6964. where (A rem B) has the sign of A and  an  absolute  value  less  than  the
  6965. absolute value of B.  Integer division satisfies the identity
  6966.     (-A)/B = -(A/B) = A/(-B)
  6967. The  result of the modulus operation is such that (A mod B) has the sign of
  6968. B and an absolute value less than the absolute value of  B;   in  addition,
  6969. for some integer value N, this result must satisfy the relation
  6970.     A = B*N + (A \umod\n B)
  6971. For  each  \vfixed  point  type\v319.,  the  following  multiplication and division
  6972. operators, with an operand of the predefined type INTEGER, are  predefined.
  6973.  Operator   Operation   Left operand      Right operand     Result type
  6974.                         type              type
  6975.    *        multiply    any fixed point   INTEGER           same as left
  6976.                         type
  6977.                         INTEGER           any fixed point   same as right
  6978.                                           type
  6979.    /        division    any fixed point   INTEGER           same as left
  6980.                         type
  6981. Integer  multiplication  of  fixed  point  values is equivalent to repeated
  6982. addition.  Division of a fixed point value by an integer does not involve a
  6983. change in type but is approximate (see 4.5.7).
  6984. Finally, the following multiplication and division operators  are  declared
  6985. in  the  \vpredefined package STANDARD\v806..  These two special operators apply to
  6986. operands of all fixed point types (it is a consequence of other rules  that
  6987. they cannot be renamed or given as generic \vactual parameters\v607.).
  6988. Operator  Operation  Left operand      Right operand      Result type
  6989.                      type              type
  6990.   *       multiply   any fixed point   any fixed point    universal_fixed
  6991.                      type              type
  6992.   /       divide     any fixed point   any fixed point    universal_fixed
  6993.                      type              type
  6994. Multiplication of operands of the same or of different fixed point types is
  6995. exact  and  delivers  a result of the anonymous predefined fixed point type
  6996. universal_fixed whose delta is arbitrarily small.  The result of  any  such
  6997. multiplication  must  always  be explicitly converted to some \vnumeric type\v310..
  6998. This ensures explicit control of the accuracy of the computation.  The same
  6999. considerations apply to division of a fixed point value  by  another  fixed
  7000. point  value.  No other operators are defined for the type universal_fixed.
  7001. The exception \vNUMERIC_ERROR\v1101. is raised by integer division, rem, and mod  if
  7002. the right operand is zero.
  7003. \uExamples:\n
  7004.     I : INTEGER := 1;
  7005.     J : INTEGER := 2;
  7006.     K : INTEGER := 3;
  7007.     X : REAL \udigits\n 6 := 1.0;             --     see 3.5.7
  7008.     Y : REAL \udigits\n 6 := 2.0;
  7009.     F : FRACTION \udelta\n 0.0001  := 0.1;        --     see 3.5.9
  7010.     G : FRACTION \udelta\n 0.0001  := 0.1;
  7011.     Expression        Value     Result Type
  7012.     I*J               2         same as I and J, that is, INTEGER
  7013.     K/J               1         same as K and J, that is, INTEGER
  7014.     K \umod\n J           1         same as K and J, that is, INTEGER
  7015.     X/Y               0.5       same as X and Y, that is, REAL
  7016.     F/2               0.05      same as F, that is, FRACTION
  7017.     3*F               0.3       same as F, that is, FRACTION
  7018.     F*G               0.01      universal_fixed, conversion needed
  7019.     FRACTION(F*G)     0.01      FRACTION, as stated by the conversion
  7020.     REAL(J)*Y         4.0       REAL, the type of both operands after
  7021.                                 conversion of J
  7022. \uNotes:\n
  7023. For positive A and B, A/B is the quotient and A rem B is the remainder when
  7024. A  is  divided  by  B.   The  following  relations are satisfied by the rem
  7025. operator:
  7026.     A    \urem\n (-B) =   A \urem\n B
  7027.     (-A) \urem\n   B  = -(A \urem\n B)
  7028. For any integer K, the following identity holds:
  7029.       A  \umod\n   B  =  (A + K*B) \umod\n B
  7030. The  relations  between  integer  division,  remainder,  and  modulus   are
  7031. illustrated by the following table:
  7032.    A      B   A/B   A \urem\n B  A \umod\n B     A     B    A/B   A \urem\n B   A \umod\n B
  7033.    10     5    2       0        0       -10    5    -2       0         0
  7034.    11     5    2       1        1       -11    5    -2      -1         4
  7035.    12     5    2       2        2       -12    5    -2      -2         3
  7036.    13     5    2       3        3       -13    5    -2      -3         2
  7037.    14     5    2       4        4       -14    5    -2      -4         1
  7038.    10    -5   -2       0        0       -10   -5     2       0         8
  7039.    11    -5   -2       1       -4       -11   -5     2      -1        -1
  7040.    12    -5   -2       2       -3       -12   -5     2      -2        -2
  7041.    13    -5   -2       3       -2       -13   -5     2      -3        -3
  7042.    14    -5   -2       4       -1       -14   -5     2      -4        -4
  7043. 4.5.6  \uHighest Precedence Operators\n
  7044. The highest precedence unary operator \uabs\n is  predefined  for  any  numeric
  7045. type.   The  highest  precedence  unary  operator not is predefined for any
  7046. \vboolean type\v313. and any one-dimensional \varray type\v321.  whose  components  have  a
  7047. boolean type.
  7048.  Operator   Operation          Operand type                  Result type
  7049.   \uabs\n      absolute value     any numeric type              same numeric type
  7050.   \unot\n      logical negation   any boolean type              same boolean type
  7051.                               array of boolean components   same array type
  7052. The  operator  not  that  applies  to  a  one-dimensional  array of boolean
  7053. components yields a one-dimensional boolean array  with  the  same  bounds;
  7054. each  component  of  the  result  is  obtained  by  logical negation of the
  7055. corresponding component of the operand (that is, the component that has the
  7056. same \vindex\v321. value).
  7057. The highest precedence exponentiating operator ** is  predefined  for  each
  7058. \vinteger  type\v314.  and  for each \vfloating point type\v319..  In either case the right
  7059. operand, called the exponent, is of the predefined type INTEGER.
  7060.  Operator  Operation      Left operand         Right operand   Result type
  7061.                           type                 type
  7062.    **     exponentiation  any integer type     INTEGER         same as left
  7063.                           any floating point   INTEGER         same as left
  7064.                           type
  7065. Exponentiation  with  a  positive  exponent  is  equivalent   to   repeated
  7066. \vmultiplication\v416.  of the left operand by itself, as indicated by the exponent
  7067. and from left to right.  For an operand  of  a  floating  point  type,  the
  7068. exponent  can be negative, in which case the value is the reciprocal of the
  7069. value with the  positive  exponent.   Exponentiation  by  a  zero  exponent
  7070. delivers  the  value  one.   Exponentiation of a value of a floating  point
  7071. type is approximate (see 4.5.7).  Exponentiation of an integer  raises  the
  7072. exception \vCONSTRAINT_ERROR\v1101. for a negative exponent.
  7073. 4.5.7 \uAccuracy of Operations with Real Operands\n
  7074. A  real  \vsubtype\v305.  specifies  a  set  of  model  numbers.  Both the accuracy
  7075. required from any basic or \vpredefined operation\v308. giving a real  result,  and
  7076. the  result of any predefined \vrelation\v410. between real operands are defined in
  7077. terms of these \vmodel numbers\v316..
  7078. A model interval of a subtype  is  any  interval  whose  bounds  are  model
  7079. numbers  of  the  subtype.  The model interval associated with a value that
  7080. belongs to a real subtype is the smallest model interval (of  the  subtype)
  7081. that  includes  the  value.   (The  model  interval associated with a model
  7082. number of a subtype consists of that number only.)
  7083. For any \vbasic operation\v308. or predefined operator that yields a  result  of  a
  7084. real  subtype,  the  required  bounds  on  the  result are given by a model
  7085. interval defined as follows:
  7086.   -  The result model interval is  the  smallest  model  interval  (of  the
  7087.      result  subtype)  that includes the minimum and the maximum of all the
  7088.      values obtained by applying the (exact) mathematical  operation,  when
  7089.      each  operand is given any value of the model interval (of the operand
  7090.      subtype) defined for the operand.
  7091.   -  The model interval of an operand that  is  itself  the  result  of  an
  7092.      operation,  other  than  an  implicit  conversion, is the result model
  7093.      interval of this operation.
  7094.   -  The model interval of an operand whose value is obtained  by  implicit
  7095.      conversion  of a \vuniversal expression\v401. is the model interval associated
  7096.      with this value within the operand subtype.
  7097. The result model interval is undefined if the absolute value of one of  the
  7098. above  mathematical  results  exceeds the largest \vsafe number\v316. of the result
  7099. type.  Whenever the result  model  interval  is  undefined,  it  is  highly
  7100. desirable  that the exception \vNUMERIC_ERROR\v1101. be raised if the implementation
  7101. cannot produce an actual result that is in the \vrange\v311. of safe numbers.  This
  7102. is, however, not required by the language rules, in recognition of the fact
  7103. that certain target machines do  not  permit  easy  detection  of  overflow
  7104. situations.  The value of the \vattribute\v405. \vMACHINE_OVERFLOWS\v1309. indicates whether
  7105. the   target   machine  raises  the  exception  NUMERIC_ERROR  in  overflow
  7106. situations (see 13.7.3).
  7107. The safe numbers of a \vreal type\v316. are defined (see 3.5.6) as  a  superset  of
  7108. the  model  numbers,  for  which  \verror bounds\v316. follow the same rules as for
  7109. model numbers.  Any definition given in this  section  in  terms  of  model
  7110. intervals  can  therefore be extended to safe intervals of safe numbers.  A
  7111. consequence of this extension is that an implementation is not  allowed  to
  7112. raise  the  exception  NUMERIC_ERROR  when  the  result  interval is a safe
  7113. interval.
  7114. For the result of \vexponentiation\v417., the model interval defining the bounds on
  7115. the result is obtained by applying the  above  rules  to  the  sequence  of
  7116. \vmultiplications\v416.  defined  by the exponent, and to the final division in the
  7117. case of a negative exponent.
  7118. For the result of a relation between two real operands, consider  for  each
  7119. operand  the  model  interval  (of  the  operand  subtype)  defined for the
  7120. operand;  the result can be any value obtained by applying the mathematical
  7121. comparison to values arbitrarily chosen in the corresponding operand  model
  7122. intervals.   If  either or both of the operand model intervals is undefined
  7123. (and if neither of the operand evaluations raises an  exception)  then  the
  7124. result  of  the  comparison  is  allowed to be any possible value (that is,
  7125. either TRUE or FALSE).
  7126. The result of a \vmembership test\v413. is defined in terms of comparisons  of  the
  7127. operand  value  with  the lower and upper bounds of the given range or type
  7128. mark (the usual rules apply to these comparisons).
  7129. Note:
  7130. For a \vfloating point type\v319. the numbers 15.0, 3.0, and 5.0 are  always  model
  7131. numbers.  Hence X/Y where X equals 15.0 and Y equals 3.0 yields exactly 5.0
  7132. according to the above rules.  In the general case, division does not yield
  7133. model numbers and in consequence one cannot assume that (1.0/X)*X = 1.0.
  7134. 4.6  \uType Conversions\n
  7135. The evaluation of an  explicit \vtype\v305.  conversion  evaluates  the  \vexpression\v410.
  7136. given  as  the  operand,  and  converts  the resulting value to a specified
  7137. target type.  Explicit type conversions are allowed between closely related
  7138. types as defined below.
  7139.     type_conversion ::= type_mark(expression)
  7140. The target type of a type conversion is the \vbase type\v305.  of  the  type  mark.
  7141. The  type  of  the  operand  of  a  type  conversion  must  be determinable
  7142. independently of the context (in particular, independently  of  the  target
  7143. type).   Furthermore, the operand of a type conversion is not allowed to be
  7144. a literal null, an allocator,  an  aggregate,  or  a  string  literal;   an
  7145. expression  enclosed  by  parentheses  is  allowed as the operand of a type
  7146. conversion only if the expression alone is allowed.
  7147. A conversion to a \vsubtype\v305. consists of  a  conversion  to  the  target  type
  7148. followed  by  a  check  that  the  result  of the conversion \vbelongs to the\v305.
  7149. \vsubtype\v305..  A conversion of an operand of a given type to the type itself  is
  7150. allowed.
  7151. The  other  allowed  explicit  type conversions correspond to the following
  7152. three cases:
  7153. (a)  Numeric types
  7154.      The operand can be of any numeric type;  the value of the  operand  is
  7155.      converted  to  the target type which must also be a numeric type.  For
  7156.      conversions involving \vreal types\v316., the result is within the accuracy of
  7157.      the specified subtype (see 4.5.7).  The conversion of a real value  to
  7158.      an  integer  type  rounds  to  the nearest integer;  if the operand is
  7159.      halfway between two integers (within the accuracy of the real subtype)
  7160.      rounding may be either up or down.
  7161. (b)  \vDerived types\v309.
  7162.      The conversion is allowed if one of the target type  and  the  operand
  7163.      type  is  derived  from the other, directly or indirectly, or if there
  7164.      exists a third type from which both types  are  derived,  directly  or
  7165.      indirectly.
  7166. (c)  \vArray types\v321.
  7167.      The  conversion is allowed if the operand type and the target type are
  7168.      array types that satisfy the following conditions:   both  types  must
  7169.      have the same dimensionality;  for each \vindex\v321. position the \vindex types\v321.
  7170.      must  either  be  the  same  or  be  convertible  to  each other;  the
  7171.      \vcomponent\v305. types must be the same;  finally, if the component type is a
  7172.      type with discriminants or an access type, the component subtypes must
  7173.      be either both constrained or both unconstrained.  If  the  type  mark
  7174.      denotes  an  \vunconstrained  array type\v321., then, for each index position,
  7175.      the bounds of the result are obtained by converting the bounds of  the
  7176.      operand  to  the  corresponding index type of the target type.  If the
  7177.      \vtype mark\v307. denotes a \vconstrained array subtype\v321., then the bounds of  the
  7178.      result  are those imposed by the type mark.  In either case, the value
  7179.      of each component of the result is that of the \vmatching  component\v413.  of
  7180.      the operand (see 4.5.2).
  7181. In  the  case  of  conversions  of  numeric  types  and  derived types, the
  7182. exception \vCONSTRAINT_ERROR\v1101. is raised by the evaluation of a type conversion
  7183. if the result of the conversion fails to satisfy a  constraint  imposed  by
  7184. the type mark.
  7185. In  the  case  of  array  types, a check is made that any constraint on the
  7186. component subtype is the same for the operand array type as for the  target
  7187. array  type.   If  the type mark denotes an unconstrained array type and if
  7188. the operand is not a \vnull array\v322., then, for each index position, a check  is
  7189. made  that  the  bounds  of  the  result  belong to the corresponding index
  7190. subtype of the target type.  If the type mark denotes a  constrained  array
  7191. subtype,  a check is made that for each component of the operand there is a
  7192. matching component of the target subtype, and vice  versa.   The  exception
  7193. CONSTRAINT_ERROR is raised if any of these checks fails.
  7194. If a conversion is allowed from one type to another, the reverse conversion
  7195. is  also allowed. This reverse conversion is used where an \vactual parameter\v607.
  7196. of \vmode\v601. in out or out has the form of a type  conversion  of  a  (\vvariable\v303.)
  7197. \vname\v401. as explained in section 6.4.1.
  7198. Apart  from  the  explicit  type conversions, the only allowed form of type
  7199. conversion  is  the  implicit  conversion  of   a   value   of   the   type
  7200. \vuniversal_integer\v314. or \vuniversal_real\v316. into another \vnumeric type\v310..  An implicit
  7201. conversion of an operand of type universal_integer to another integer type,
  7202. or  of  an operand of type universal_real to another real type, can only be
  7203. applied if the operand is either a \vnumeric literal\v204., a \vnamed number\v302.,  or  an
  7204. \vattribute\v405.;   such  an  operand is called a convertible universal operand in
  7205. this section.  An implicit conversion of a convertible universal operand is
  7206. applied if and only if the innermost complete context (see 8.7)  determines
  7207. a unique (numeric) target type for the implicit conversion, and there is no
  7208. legal interpretation of this context without this conversion.
  7209. \uNotes:\n
  7210. The  rules  for  implicit  conversions imply that no implicit conversion is
  7211. ever applied to the operand of an  explicit  type  conversion.   Similarly,
  7212. implicit  conversions  are  not  applied  if  both operands of a predefined
  7213. relational operator are convertible universal operands.
  7214. The language allows implicit subtype conversions in the case of array types
  7215. (see 5.2.1).  An explicit type conversion can have the effect of  a  change
  7216. of  \vrepresentation\v1301. (in particular see 13.6).  Explicit conversions are also
  7217. used for actual parameters (see 6.4).
  7218. Examples of numeric type conversion:
  7219.     REAL(2*J)      --  value is converted to \vfloating point\v317.
  7220.     INTEGER(1.6)   --  value is 2
  7221.     INTEGER(-0.4)  --  value is 0
  7222. Example of conversion between derived types:
  7223.     type A_FORM is new B_FORM;
  7224.     X : A_FORM;
  7225.     Y : B_FORM;
  7226.     X := A_FORM(Y);
  7227.     Y := B_FORM(X);  --  the reverse conversion
  7228. Examples of conversions between array types:
  7229.     \utype\n SEQUENCE \uis array\n (INTEGER \urange\n <>) \uof\n INTEGER;
  7230.     \usubtype\n DOZEN \uis\n SEQUENCE(1 .. 12);
  7231.     LEDGER : \uarray\n(1 .. 100) \uof\n INTEGER;
  7232.     SEQUENCE(LEDGER)            --  bounds are those of LEDGER
  7233.     SEQUENCE(LEDGER(31 .. 42))  --  bounds are 31 and 42
  7234.     DOZEN(LEDGER(31 .. 42))     --  bounds are those of DOZEN
  7235. Examples of implicit conversions:
  7236.     X : INTEGER := 2;
  7237.     X + 1 + 2              -- implicit conversion of each integer literal
  7238.     1 + 2 + X              -- implicit conversion of each integer literal
  7239.     X + (1 + 2)            -- implicit conversion of each integer literal
  7240.     2 = (1 + 1)            -- no implicit conversion:  the type is uni-
  7241.                               versal_integer
  7242.     A'LENGTH = B'LENGTH    -- no implicit conversion:  the type is uni-
  7243.                               versal_integer
  7244.     C : \uconstant\n := 3 + 2; -- no implicit conversion:  the type is uni-
  7245.                               versal_integer
  7246.     X = 3 \uand\n 1 = 2        -- implicit conversion of 3, but not of 1 and 2
  7247. 4.7  \uQualified Expressions\n
  7248. A  qualified  \vexpression\v410. is used to state explicitly the \vtype\v305., and possibly
  7249. the \vsubtype\v305., of an operand that is the given expression or \vaggregate\v407..
  7250.     qualified_expression ::=
  7251.        type_mark'(expression) | type_mark'aggregate
  7252. The operand must have the same type as the \vbase type\v305. of the \vtype mark\v307..  The
  7253. value of  a  qualified  expression  is  the  value  of  the  operand.   The
  7254. evaluation  of a qualified expression evaluates the operand and checks that
  7255. its value belongs to the subtype denoted by the type mark.   The  exception
  7256. \vCONSTRAINT_ERROR\v1101. is raised if this check fails.
  7257. \uExamples:\n
  7258.     \utype\n MASK \uis\n (FIX, DEC, EXP, SIGNIF);
  7259.     \utype\n CODE \uis\n (FIX, CLA, DEC, TNZ, SUB);
  7260.     PRINT (MASK'(DEC));  --  DEC is of type MASK
  7261.     PRINT (CODE'(DEC));  --  DEC is of type CODE
  7262.     \ufor\n J \uin\n CODE'(FIX) .. CODE'(DEC) \uloop\n ... -- qualification needed for
  7263.                                                   either FIX or DEC
  7264.     \ufor\n J \uin\n CODE \urange\n FIX .. DEC \uloop\n ...    -- qualification unnecessary
  7265.     \ufor\n J \uin\n CODE'(FIX) .. DEC \uloop\n ...        -- qualification unnecessary
  7266.                                                   for DEC
  7267.     DOZEN'(1 | 3 | 5 | 7 => 2, \uothers\n => 0) -- see 4.6
  7268. \uNotes:\n
  7269. Whenever  the type of an \venumeration literal\v311. or aggregate is not known from
  7270. the context,  a  qualified  expression  can  be  used  to  state  the  type
  7271. explicitly.   For  example,  an  overloaded  enumeration  literal  must  be
  7272. qualified in the  following  cases:   when  given  as  a  parameter   in  a
  7273. \vsubprogram\v600.  call  to  an  overloaded  subprogram  that  cannot otherwise be
  7274. identified on the basis of  remaining  parameter  or  result  types,  in  a
  7275. relational  expression  where  both  operands  are  overloaded  enumeration
  7276. literals, or in an \varray\v321. or \vloop parameter\v506.  range  where  both  bounds  are
  7277. overloaded  enumeration  literals.   Explicit qualification is also used to
  7278. specify which one of a set of overloaded parameterless \vfunctions\v609. is  meant,
  7279. or to constrain a value to a given subtype.
  7280. 4.8  \uAllocators\n
  7281. The evaluation of an allocator creates an \vobject\v303. and yields an \vaccess value\v330.
  7282. that \vdesignates\v330. the object.
  7283.     allocator ::=
  7284.        \unew\n \vsubtype_indication\v307. | \unew\n \vqualified_expression\v420.
  7285. The \vtype\v305. of the object created by an allocator is the base type of the type
  7286. mark given in either the subtype indication or  the  qualified  expression.
  7287. For  an  allocator with a qualified expression, this expression defines the
  7288. \vinitial value\v303. of the created object.  The type of the access value returned
  7289. by an allocator must be determinable solely from the context, but using the
  7290. fact that the value  returned  is  of  an  \vaccess  type\v330.  having  the  named
  7291. designated type.
  7292. The  only  allowed  forms  of  \vconstraint\v305.  in  the subtype indication of an
  7293. allocator are index and \vdiscriminant constraints\327..  If an allocator includes
  7294. a subtype indication and if the type of the object created is an \varray type\v321.
  7295. or a \vtype with discriminants\v305. that do not have default expressions, then the
  7296. subtype indication must either denote a constrained subtype, or include  an
  7297. explicit index or discriminant constraint.
  7298. If  the  type  of  the  created  object  is  an  array  type or a type with
  7299. discriminants, then the created  object  is  always  constrained.   If  the
  7300. allocator  includes a subtype indication, the created object is constrained
  7301. either by the subtype or  by  the  default  discriminant  values.   If  the
  7302. allocator   includes   a   qualified  expression,  the  created  object  is
  7303. constrained by the bounds or discriminants of the initial value.  For other
  7304. types, the subtype of the created object is  the  subtype  defined  by  the
  7305. subtype indication of the \vaccess type definition\v330..
  7306. For  the  evaluation  of  an  allocator,  the  \velaboration\v333.  of  the subtype
  7307. indication or the \vevaluation  of  the  qualified  expression\v420.  is  performed
  7308. first.  The new object is then created.  Initializations are then performed
  7309. as  for  a  declared  object (see 3.2.1);  the \vinitialization\v303. is considered
  7310. explicit in the case of a qualified expression;   any  initializations  are
  7311. implicit  in  the  case  of a subtype indication.  Finally, an access value
  7312. that designates the created object is returned.
  7313. An implementation must guarantee that any object created by the  evaluation
  7314. of  an allocator remains allocated for as long as this object or one of its
  7315. \vsubcomponents\v305. is accessible directly or indirectly, that is, as long as  it
  7316. can  be  denoted  by  some  name.   Moreover,  if  an  object or one of its
  7317. subcomponents belongs to a \vtask type\v902., it is considered to be accessible  as
  7318. long  as  the task is not terminated.  An implementation may (but need not)
  7319. reclaim the storage occupied by an object created  by  an  allocator,  once
  7320. this object has become inaccessible.
  7321. When  an  application  needs  closer  control  over  storage allocation for
  7322. objects designated by values  of  an  access  type,  such  control  may  be
  7323. achieved by one or more of the following means:
  7324. (a)  The total amount of storage available for the \vcollection\v330. of objects of
  7325.      an access type can be set by means of a \vlength clause\v1302. (see 13.2).
  7326. (b)  The  \vpragma\v210.  CONTROLLED  informs  the  implementation  that  automatic
  7327.      storage  reclamation  must  not be performed for objects designated by
  7328.      values of the access type, except upon  leaving  the  innermost  \vblock\v507.
  7329.      statement, \vsubprogram body\v603., or \vtask body\v901. that encloses the access type
  7330.      declaration, or after leaving the \vmain program\v1001..
  7331.         \upragma\n CONTROLLED (access_type_simple_name);
  7332.      A  pragma  CONTROLLED  for  a given access type is allowed at the same
  7333.      places as a \vrepresentation clause\v1301.  for  the  type  (see  13.1).   This
  7334.      pragma is not allowed for a \vderived type\v309..
  7335. (c)  The explicit deallocation of the object designated by an access  value
  7336.      can  be  achieved  by calling a \vprocedure\v600. obtained by \vinstantiation\v1206. of
  7337.      the predefined \vgeneric library procedure\v1201.  UNCHECKED_DEALLOCATION  (see
  7338.      13.10.1).
  7339. The  exception  \vSTORAGE_ERROR\v1101.  is  raised  by  an allocator if there is not
  7340. enough storage.  Note also  that  the  exception  CONSTRAINT_ERROR  can  be
  7341. raised by the evaluation of the qualified expression, by the elaboration of
  7342. the subtype indication, or by the initialization.
  7343. Examples (for access types declared in section 3.8):
  7344.  \unew\n CELL'(0, \unull\n, \unull\n)                          -- initialized explicitly
  7345.  \unew\n CELL'(VALUE => 0, SUCC => \unull\n, PRED => \unull\n) -- initialized explicitly
  7346.  \unew\n CELL                                          -- not initialized
  7347.  \unew\n MATRIX(1 .. 10, 1 .. 20)                  -- the bounds only are given
  7348.  \unew\n MATRIX'(1 .. 10 => (1 .. 20 => 0.0))      -- initialized explicitly
  7349.  \unew\n BUFFER(100)                          -- the discriminant only is given
  7350.  \unew\n BUFFER'(SIZE => 80, POS => 0, VALUE => (1 .. 80 => 'A'))
  7351.                                                -- initialized explicitly
  7352. 4.9  \uStatic Expressions and Static Subtypes\n
  7353. Certain  \vexpressions\v410.  of  a  \vscalar type\v310. are said to be static.  Similarly,
  7354. certain \vdiscrete ranges\v321. are said to  be  static,  and  the  type  marks  of
  7355. certain scalar \vsubtypes\v305. are said to denote static subtypes.
  7356. An  expression  of  a scalar type is said to be static if and only if every
  7357. primary is one of those listed in (a) through  (h)  below,  every  operator
  7358. denotes  a  \vpredefined  operator\v411.,  and  the  evaluation  of  the expression
  7359. delivers a value (that is, it does not raise an \vexception\v1100.):
  7360. (a)  An \venumeration literal\v311. (including a \vcharacter literal\v207.).
  7361. (b)  A \vnumeric literal\v204..
  7362. (c)  A \vnamed number\v302..
  7363. (d)  A \vconstant\v303. explicitly declared by a \vconstant declaration\v303. with a static
  7364.      subtype, and \vinitialized\v303. with a static expression.
  7365. (e)  A \vfunction\v609. call whose function name is an operator symbol that denotes
  7366.      a predefined operator, including a function name that is  an  expanded
  7367.      name;  each \vactual parameter\v607. must also be a static expression.
  7368. (f)  A language-defined \vattribute\v405. of a static subtype;   for  an  attribute
  7369.      that  is  a  function,  the  actual  parameter  must  also be a static
  7370.      expression.
  7371. (g)  A \vqualified expression\v420. whose \vtype mark\v307. denotes a  static  subtype  and
  7372.      whose operand is a static expression.
  7373. (h)  A static expression enclosed in parentheses.
  7374. A  static  range  is a range whose bounds are static expressions.  A static
  7375. range constraint is a \vrange constraint\v310. whose range  is  static.   A  static
  7376. subtype is either a scalar \vbase type\v305., other than a \vgeneric formal type\v1203.;  or
  7377. a  scalar  subtype  formed  by imposing on a static subtype either a static
  7378. range constraint, or a floating  or  fixed  point  constraint  whose  range
  7379. constraint,  if any, is static.  A static discrete range is either a static
  7380. subtype or  a  static  range.   A  static  index  constraint  is  an  index
  7381. constraint  for which each index subtype of the corresponding array type is
  7382. static, and in which each discrete range is static.  A static  discriminant
  7383. constraint  is  a  discriminant  constraint  for  which the subtype of each
  7384. discriminant is static, and in which each expression is static.
  7385. \uNotes:\n
  7386. The accuracy of the evaluation of a static expression having a real type is
  7387. defined by the rules given in section 4.5.7.  If the result is not a  \vmodel\v316.
  7388. \vnumber\v316.  (or  a  \vsafe  number\v316.)  of  the  type,  the  value  obtained by this
  7389. evaluation at compilation time need not be the same as the value that would
  7390. be obtained by an evaluation at run time.
  7391. Array attributes are not static:  in particular, the RANGE attribute is not
  7392. static.
  7393. 4.10  \uUniversal Expressions\n
  7394. A  universal_expression  is  either an expression that delivers a result of
  7395. type  \vuniversal_integer\v314.  or  one   that   delivers   a   result   of   type
  7396. universal_real.
  7397. The  same  \voperations  are predefined\v308. for the type universal_integer as for
  7398. any \vinteger  type\v314..   The  same  operations  are  predefined  for  the  type
  7399. universal_real  as  for  any  \vfloating  point  type\v319..   In  addition,  these
  7400. operations include the following multiplication and division operators:
  7401. Operator  Operation  Left operand       Right operand       Result type
  7402.                      type               type
  7403.    *      multiply   universal_real     universal_integer   universal_real
  7404.                      universal_integer  universal_real      universal_real
  7405.    /      divide     universal_real     universal_integer   universal_real
  7406. The  accuracy  of  the  \vevaluation  of  a  universal  expression\v411.  of   type
  7407. universal_real  is at least as good as that of the most accurate predefined
  7408. floating  point  type  supported  by   the   implementation,   apart   from
  7409. universal_real  itself.  Furthermore, if a universal expression is a static
  7410. expression, then the evaluation must be exact.
  7411. For the evaluation of an operation of a nonstatic universal expression,  an
  7412. implementation  is allowed to raise the exception NUMERIC_ERROR only if the
  7413. result of the operation is a real value whose absolute  value  exceeds  the
  7414. largest  \vsafe  number\v316.  of  the most accurate predefined floating point type
  7415. (excluding universal_real), or an integer value greater than \vSYSTEM.MAX_INT\v1308.
  7416. or less than \vSYSTEM.MIN_INT\v1308..
  7417. Note:
  7418. It is a consequence of the  above  rules  that  the  type  of  a  universal
  7419. expression   is   universal_integer  if  every  \vprimary\v410.  contained  in  the
  7420. expression is of this type (excluding \vactual parameters\v607. of \vattributes\v405.  that
  7421. are  \vfunctions\v609.,  and  excluding right operands of exponentiation operators)
  7422. and that otherwise the type is universal_real.
  7423. \uExamples:\n
  7424.     1 + 1       -- 2
  7425.     \uabs\n(-10)*3  -- 30
  7426.     KILO : \uconstant\n := 1000;
  7427.     MEGA : \uconstant\n := KILO*KILO;   -- 1_000_000
  7428.     LONG : \uconstant\n := FLOAT'DIGITS*2;
  7429.     HALF_PI    : \uconstant\n := PI/2;           -- see 3.2.2
  7430.     DEG_TO_RAD : \uconstant\n := HALF_PI/90;
  7431.     RAD_TO_DEG : \uconstant\n := 1.0/DEG_TO_RAD; -- equivalent to
  7432.                                                 1.0/((3.14159_26536/2)/90)
  7433. 5.       \uStatements\n
  7434. A  statement  defines  an  action  to be performed;  the process by which a
  7435. statement achieves its action is called execution of the statement.
  7436. This chapter describes the general  rules  applicable  to  all  statements.
  7437. Some  specific  statements are discussed in later chapters.  \vProcedure call\v606.
  7438. \vstatements\v606. are described in Chapter 6 on subprograms.  \vEntry  call\v905.,  \vdelay\v906.,
  7439. \vaccept\v905.,  \vselect\v907.,  and \vabort statements\v913. are described in Chapter 9 on tasks.
  7440. \vRaise statements\v1103. are described  in  Chapter  11  on  exceptions,  and  \vcode\v1312.
  7441. \vstatements\v1312.  in Chapter 13.  The remaining forms of statements are presented
  7442. in this chapter.
  7443. More details:
  7444.  5.1    \vSimple and Compound Statements - Sequences of Statements\v501.
  7445.  5.2    \vAssignment Statement\v502.
  7446.  5.3    \vIf Statements\v504.
  7447.  5.4    \vCase Statements\v505.
  7448.  5.5    \vLoop Statements\v506.
  7449.  5.6    \vBlock Statements\v507.
  7450.  5.7    \vExit Statements\v508.
  7451.  5.8    \vReturn Statements\v509.
  7452.  5.9    \vGoto Statements\v510.
  7453. 5.1  \uSimple and Compound Statements - Sequences of Statements\n
  7454. A statement is either simple or compound.  A simple statement  encloses  no
  7455. other  statement.   A  compound statement can enclose simple statements and
  7456. other compound statements.
  7457.     sequence_of_statements ::= statement {statement}
  7458.     statement ::=
  7459.        {label} simple_statement | {label} compound_statement
  7460.     simple_statement ::= null_statement
  7461.        | \vassignment_statement\v502. | \vprocedure_call_statement\v606.
  7462.        | \vexit_statement\v508.       | \vreturn_statement\v509.
  7463.        | \vgoto_statement\v510.       | \ventry_call_statement\v905.
  7464.        | \vdelay_statement\v906.      | \vabort_statement\v913.
  7465.        | \vraise_statement\v1103.      | \vcode_statement\v1312.
  7466.     compound_statement ::=
  7467.          \vif_statement\v504.         | \vcase_statement\v505.
  7468.        | \vloop_statement\v506.       | \vblock_statement\v507.
  7469.        | \vaccept_statement\v905.     | \vselect_statement\v907.
  7470.     label ::= <<label_\vsimple_name\v401.>>
  7471.     null_statement ::= \unull\n;
  7472. A statement is said to be labeled by the label name of  any  label  of  the
  7473. statement.  A label name, and similarly a loop or \vblock name\v507., is implicitly
  7474. declared  at  the  end  of  the  declarative  part  of  the innermost block
  7475. statement, \vsubprogram body\v603., \vpackage body\v701., \vtask body\v901., or \vgeneric  body\v1201.  that
  7476. encloses  the  labeled  statement,  the  named loop statement, or the named
  7477. block statement, as the case may be.   For  a  block  statement  without  a
  7478. declarative  part,  an implicit \vdeclarative part\v333. (and preceding declare) is
  7479. assumed.
  7480. The \vimplicit declarations\v301. for different label names, \vloop names\v506., and  block
  7481. names  occur  in  the  same  order  as  the beginnings of the corresponding
  7482. labeled  statements,  loop  statements,  and  block  statements.   Distinct
  7483. \videntifiers\v203.  must  be  used  for  all label, loop, and block names that are
  7484. implicitly declared within the body of a  program  unit,  including  within
  7485. block statements enclosed by this body, but excluding within other enclosed
  7486. program  units  (a  program  unit is either a \vsubprogram\v600., a \vpackage\v700., a \vtask\v901.
  7487. \vunit\v901., or a \vgeneric unit\v1200.).
  7488. Execution of a null statement has no other effect than to pass to the  next
  7489. action.
  7490. The  execution of a sequence of statements consists of the execution of the
  7491. individual statements in succession until the sequence is completed,  or  a
  7492. transfer of control takes place.  A transfer of control is caused either by
  7493. the execution of an exit, return, or goto statement;  by the selection of a
  7494. \vterminate  alternative\v908.; by the \vraising of an exception\v1100.;  or (indirectly) by
  7495. the execution of an abort statement.
  7496. Examples of labeled statements:
  7497.     <<HERE>> <<ICI>> <<AQUI>> <<HIER>> \unull\n;
  7498.     <<AFTER>> X := 1;
  7499. Note:
  7500. The \vscope\v802. of a declaration starts at the place of  the  \vdeclaration\v301.  itself
  7501. (see  8.2).   In  the case of a label, loop, or block name, it follows from
  7502. this rule that the scope of the  implicit  declaration  starts  before  the
  7503. first  explicit occurrence of the corresponding name, since this occurrence
  7504. is either in a statement label, a loop statement, a block statement,  or  a
  7505. goto  statement.   An  implicit declaration in a block statement may hide a
  7506. declaration given in an outer \vprogram unit\v600. or block statement (according to
  7507. the usual rules of \vhiding\v803. explained in section 8.3).
  7508. 5.2  \uAssignment Statement\n
  7509. An assignment statement replaces the current value of a \vvariable\v303. with a new
  7510. value specified by an \vexpression\v410..  The named variable  and  the  right-hand
  7511. side  expression must be of the same \vtype\v305.;  this type must not be a limited
  7512. type.
  7513.     assignment_statement ::=
  7514.        variable_name := expression;
  7515. For the execution of an assignment statement, the  variable  \vname\v401.  and  the
  7516. expression  are  first  evaluated, in some order that is not defined by the
  7517. language.  A check is then made that the value of the expression belongs to
  7518. the \vsubtype\v305. of the variable, except in the case of a variable  that  is  an
  7519. \varray\v321.  (the  assignment  then involves a \vsubtype conversion\v419. as described in
  7520. section 5.2.1).  Finally, the value of the expression becomes the new value
  7521. of the variable.
  7522. The \vexception CONSTRAINT_ERROR\v1101. is raised  if  the  above-mentioned  subtype
  7523. check  fails;   in  such  a  case the current value of the variable is left
  7524. unchanged.  If the variable is a \vsubcomponent\v305. that depends on \vdiscriminants\v326.
  7525. of an unconstrained record variable, then the execution of  the  assignment
  7526. is  \verroneous\v108. if the value of any of these discriminants is changed by this
  7527. execution.
  7528. \uExamples:\n
  7529.     VALUE := MAX_VALUE - 1;
  7530.     SHADE := BLUE;
  7531.     NEXT_FRAME(F)(M, N) := 2.5;        --  see 4.1.1
  7532.     U := DOT_PRODUCT(V, W);            --  see 6.5
  7533.     WRITER := (STATUS => OPEN, UNIT => PRINTER, LINE_COUNT => 60);
  7534.                                       --  see 3.7.3
  7535.     NEXT_CAR.\uall\n := (72074, \unull\n);    --  see 3.8.1
  7536. Examples of constraint checks:
  7537.     I, J : INTEGER \urange\n 1 .. 10;
  7538.     K    : INTEGER \urange\n 1 .. 20;
  7539.      ...
  7540.     I := J;  --  identical ranges
  7541.     K := J;  --  compatible ranges
  7542.     J := K;  --  will raise the exception CONSTRAINT_ERROR if K > 10
  7543. \uNotes:\n
  7544. The values of the discriminants of an \vobject\v302. designated by an access  value
  7545. cannot  be  changed  (not  even by assigning a complete value to the object
  7546. itself) since such objects, created by \vallocators\v421., are  always  constrained
  7547. (see 4.8);  however, subcomponents of such objects may be unconstrained.
  7548. If  the  right-hand  side  expression  is either a \vnumeric literal\v204. or named
  7549. number, or an attribute that yields a result of \vtype  universal_integer\v314.  or
  7550. \vuniversal_real\v316., then an \vimplicit type conversion\v419. is performed, as described
  7551. in section 4.6.
  7552. The  determination  of  the type of the variable of an assignment statement
  7553. may require consideration of the expression if the  variable  name  can  be
  7554. interpreted  as  the  name  of  a  variable  \vdesignated\v330. by the access value
  7555. returned by a \vfunction call\v606., and similarly, as a \vcomponent\v321. or \vslice\v403. of such
  7556. a variable (see section 8.7 for the context of \voverload\v610. resolution).
  7557. More details:
  7558.  5.2.1 \vArray Assigments\v503.
  7559. 5.2.1  \uArray Assignments\n
  7560. If  the \vvariable\v303. of an \vassignment\v502. statement is an \varray\v321. variable (including
  7561. a \vslice\v403. variable), the value of the expression is implicitly  converted  to
  7562. the  subtype  of the array variable;  the result of this \vsubtype conversion\v419.
  7563. becomes the new value of the array variable.
  7564. This means that the new value of each component of the  array  variable  is
  7565. specified  by  the  \vmatching  component  in  the  array\v413.  value  obtained by
  7566. evaluation of the expression (see 4.5.2  for  the  definition  of  matching
  7567. components).   The subtype conversion checks that for each component of the
  7568. array variable there is a matching component in the array value,  and  vice
  7569. versa.   The  \vexception CONSTRAINT_ERROR\v1101. is raised if this check fails;  in
  7570. such a case the value of each component  of  the  array  variable  is  left
  7571. unchanged.
  7572. \uExamples:\n
  7573.     A : STRING(1 .. 31);
  7574.     B : STRING(3 .. 33);
  7575.      ...
  7576.     A := B;  --  same number of components
  7577.     A(1 .. 9)  := "tar sauce";
  7578.     A(4 .. 12) := A(1 .. 9);  --  A(1 .. 12) = "tartar sauce"
  7579. \uNotes:\n
  7580. Array assignment is defined even in the case of overlapping slices, because
  7581. the  expression  on  the right-hand side is evaluated before performing any
  7582. component assignment.  In the above example, an implementation yielding A(1
  7583. .. 12) = "tartartartar" would be incorrect.
  7584. The implicit subtype conversion described above for assignment to an  array
  7585. variable  is performed only for the value of the right-hand side expression
  7586. as a whole;  it is not performed for subcomponents that are  array  values.
  7587. 5.3  \uIf Statements\n
  7588. An if statement selects for execution one or none of the enclosed \vsequences\v501.
  7589. \vof  statements\v501., depending on the (truth) value of one or more corresponding
  7590. conditions.
  7591.     if_statement ::=
  7592.         \uif\n condition \uthen\n
  7593.           sequence_of_statements
  7594.        {\uelsif\n condition \uthen\n
  7595.           sequence_of_statements}
  7596.        [\uelse\n
  7597.           sequence_of_statements]
  7598.         \uend if\n;
  7599.     condition ::= boolean_expression
  7600. An \vexpression\v410. specifying a condition must be of a \vboolean type\v313..
  7601. For the execution of an if statement, the condition specified after if, and
  7602. any conditions specified after elsif, are evaluated in succession (treating
  7603. a final else as elsif TRUE then),  until  one  evaluates  to  TRUE  or  all
  7604. conditions  are  evaluated  and yield FALSE.  If one condition evaluates to
  7605. TRUE, then the corresponding sequence of statements is executed;  otherwise
  7606. none of the sequences of statements is executed.
  7607. \uExamples:\n
  7608.     \uif\n MONTH = DECEMBER \uand\n DAY = 31 \uthen\n
  7609.        MONTH := JANUARY;
  7610.        DAY   := 1;
  7611.        YEAR  := YEAR + 1;
  7612.     \uend if\n;
  7613.     \uif\n LINE_TOO_SHORT \uthen\n
  7614.        \uraise\n LAYOUT_ERROR;
  7615.     \uelsif\n LINE_FULL \uthen\n
  7616.        NEW_LINE;
  7617.        PUT(ITEM);
  7618.     \uelse\n
  7619.        PUT(ITEM);
  7620.     \uend if\n;
  7621.     \uif\n MY_CAR.OWNER.VEHICLE /= MY_CAR \uthen\n            --  see 3.8
  7622.        REPORT ("Incorrect data");
  7623.     \uend if\n;
  7624. 5.4 \u Case Statements\n
  7625. A  case  statement  selects  for  execution  one of a number of alternative
  7626. \vsequences of statements\v501.;  the chosen alternative is defined by the value of
  7627. an \vexpression\v410..
  7628.     case_statement ::=
  7629.        \ucase\n expression \uis\n
  7630.            case_statement_alternative
  7631.           {case_statement_alternative}
  7632.        \uend case\n;
  7633.     case_statement_alternative ::=
  7634.        \uwhen\n \vchoice\v328. {| choice } =>
  7635.           sequence_of_statements
  7636. The expression must be of  a  \vdiscrete  type\v310.  which  must  be  determinable
  7637. independently  of the context in which the expression occurs, but using the
  7638. fact that the expression must be of a discrete \vtype\v305..  Moreover, the type of
  7639. this expression must not be a \vgeneric formal type\v1201..  Each choice in  a  case
  7640. statement alternative must be of the same type as the expression;  the list
  7641. of  choices specifies for which values of the expression the alternative is
  7642. chosen.
  7643. If the expression is the \vname\v401. of an \vobject\v303. whose \vsubtype\v305.  is  static,  then
  7644. each  value  of  this subtype must be represented once and only once in the
  7645. set of choices of the case statement, and no other value is allowed;   this
  7646. rule  is  likewise  applied  if the expression is a \vqualified expression\v420. or
  7647. \vtype conversion\v419. whose \vtype mark\v307. denotes a \vstatic subtype\v422..   Otherwise,  for
  7648. other  forms of expression, each value of the (\vbase\v305.) type of the expression
  7649. must be represented once and only once in the set of choices, and no  other
  7650. value is allowed.
  7651. The  simple  expressions  and  discrete  ranges  given as choices in a case
  7652. statement must be static.  A choice defined by a discrete range stands  for
  7653. all  values  in the corresponding range (none if a null range).  The choice
  7654. others is only allowed for the last alternative and as its only choice;  it
  7655. stands for all values (possibly none) not given in the choices of  previous
  7656. alternatives.  A component simple name is not allowed as a choice of a case
  7657. statement alternative.
  7658. The  execution  of  a  case  statement  consists  of  the evaluation of the
  7659. expression followed by the execution of the chosen sequence of  statements.
  7660. \uExamples:\n
  7661.     \ucase\n SENSOR \uis\n
  7662.        \uwhen\n ELEVATION  => RECORD_ELEVATION(SENSOR_VALUE);
  7663.        \uwhen\n AZIMUTH    => RECORD_AZIMUTH  (SENSOR_VALUE);
  7664.        \uwhen\n DISTANCE   => RECORD_DISTANCE (SENSOR_VALUE);
  7665.        \uwhen\n others     => \unull\n;
  7666.     \uend case\n;
  7667.     \ucase\n TODAY \uis\n
  7668.        \uwhen\n MON        => COMPUTE_INITIAL_BALANCE;
  7669.        \uwhen\n FRI        => COMPUTE_CLOSING_BALANCE;
  7670.        \uwhen\n TUE .. THU => GENERATE_REPORT(TODAY);
  7671.        \uwhen\n SAT .. SUN => \unull\n;
  7672.     \uend case\n;
  7673.     \ucase\n BIN_NUMBER(COUNT) \uis\n
  7674.        \uwhen\n 1      => UPDATE_BIN(1);
  7675.        \uwhen\n 2      => UPDATE_BIN(2);
  7676.        \uwhen\n 3 | 4  =>
  7677.           EMPTY_BIN(1);
  7678.           EMPTY_BIN(2);
  7679.        \uwhen others\n => raise ERROR;
  7680.     \uend case\n;
  7681. \uNotes:\n
  7682. The  execution  of  a  case statement chooses one and only one alternative,
  7683. since the choices are exhaustive and mutually exclusive.  Qualification  of
  7684. the expression of a case statement by a static subtype can often be used to
  7685. limit the number of choices that need be given explicitly.
  7686. An  others  choice  is  required  in  a  case statement if the  type of the
  7687. expression is the type universal_integer (for example, if the expression is
  7688. an integer literal), since this is the only way to cover all values of  the
  7689. type universal_integer.
  7690. 5.5  \uLoop Statements\n
  7691. A  loop  statement includes a \vsequence of statements\v501. that is to be executed
  7692. repeatedly, zero or more times.
  7693.     loop_statement ::=
  7694.        [loop_simple_name:]
  7695.           [iteration_scheme] \uloop\n
  7696.              sequence_of_statements
  7697.            \uend loop\n [loop_simple_name];
  7698.     iteration_scheme ::= \uwhile\n condition
  7699.        | \ufor\n loop_parameter_specification
  7700.     loop_parameter_specification ::=
  7701.        identifier \uin\n [\ureverse\n] discrete_range
  7702. If a loop statement has a loop \vsimple name\v401., this simple name must be  given
  7703. both at the beginning and at the end.
  7704. A  loop  statement without an iteration scheme specifies repeated execution
  7705. of the sequence of statements.  Execution of the loop statement is complete
  7706. when the loop is left  as  a  consequence  of  the  execution  of  an  \vexit\v508.
  7707. \vstatement\v508., or as a consequence of some other transfer of control (see 5.1).
  7708. For  a  loop  statement  with  a  while  iteration scheme, the \vcondition\v504. is
  7709. evaluated before each execution of the  sequence  of  statements;   if  the
  7710. value  of the condition is \vTRUE\v313., the sequence of statements is executed, if
  7711. \vFALSE\v313. the execution of the loop statement is complete.
  7712. For a loop statement with  a  for  iteration  scheme,  the  loop  parameter
  7713. specification  is  the  \vdeclaration\v301.  of  the  loop parameter with the given
  7714. \videntifier\v203..  The loop parameter is an \vobject\v303. whose type is the \vbase type\v305. of
  7715. the \vdiscrete range\v322. (see 3.6.1).  Within the  sequence  of  statements,  the
  7716. loop parameter is a \vconstant\v303..  Hence a loop parameter is not allowed as the
  7717. (left-hand  side)  variable of an \vassignment statement\v502..  Similarly the loop
  7718. parameter must not be given as an out or in out parameter of a \vprocedure\v606. or
  7719. \ventry call statement\v905., or as an in out parameter of a \vgeneric instantiation\v1206..
  7720. For the execution of a loop statement with a for iteration scheme, the loop
  7721. parameter specification is first elaborated.  This \velaboration\v301. creates  the
  7722. loop parameter and evaluates the discrete range.
  7723. If  the discrete range is a \vnull range\v310., the execution of the loop statement
  7724. is complete.  Otherwise, the sequence of statements is  executed  once  for
  7725. each  value  of the discrete range (subject to the loop not being left as a
  7726. consequence of the execution of an exit statement or as  a  consequence  of
  7727. some  other  transfer  of  control).   Prior  to  each  such iteration, the
  7728. corresponding  value  of  the  discrete  range  is  assigned  to  the  loop
  7729. parameter.   These  values  are  assigned  in  increasing  order unless the
  7730. \vreserved word\v211. reverse is present, in which case the values are assigned  in
  7731. decreasing order.
  7732. Example of a loop statement without an iteration scheme:
  7733.     \uloop\n
  7734.        GET(CURRENT_CHARACTER);
  7735.        \uexit when\n CURRENT_CHARACTER = '*';
  7736.     \uend loop\n;
  7737. Example of a loop statement with a while iteration scheme:
  7738.     \uwhile\n BID(N).PRICE < CUT_OFF.PRICE \uloop\n
  7739.        RECORD_BID(BID(N).PRICE);
  7740.        N := N + 1;
  7741.     \uend loop\n;
  7742. Example of a loop statement with a for iteration scheme:
  7743.     \ufor\n J \uin\n BUFFER'RANGE \uloop\n     --  legal even with a null range
  7744.        \uif\n BUFFER(J) /= SPACE \uthen\n
  7745.           PUT(BUFFER(J));
  7746.        \uend if\n;
  7747.     \uend loop\n;
  7748. Example of a loop statement with a loop simple name:
  7749.     SUMMATION:
  7750.        \uwhile\n NEXT /= HEAD \uloop\n       -- see 3.8
  7751.           SUM  := SUM + NEXT.VALUE;
  7752.           NEXT := NEXT.SUCC;
  7753.        \uend loop\n SUMMATION;
  7754. \uNotes:\n
  7755. The \vscope\v802. of a loop parameter extends from the loop parameter specification
  7756. to  the end of the loop statement, and the \vvisibility\v803. rules are such that a
  7757. loop parameter is only visible within the sequence  of  statements  of  the
  7758. loop.
  7759. The  discrete  range  of  a  for  loop  is evaluated just once.  Use of the
  7760. reserved word reverse does not  alter  the  discrete  range,  so  that  the
  7761. following  iteration  schemes  are  not  equivalent;   the first has a null
  7762. range.
  7763.     \ufor\n J \uin reverse\n 1 ..  0
  7764.     \ufor\n J \uin\n 0 .. 1
  7765. Loop names are also used in exit statements, and in \vexpanded  names\v404.  (in  a
  7766. \vprefix\v401. of the loop parameter).
  7767. 5.6  \uBlock Statements\n
  7768. A  block statement encloses a \vsequence of statements\v501. optionally preceded by
  7769. a \vdeclarative part\v333. and optionally followed by \vexception handlers\v1102..
  7770.     block_statement ::=
  7771.        [block_simple_name:]
  7772.           [\udeclare\n
  7773.                declarative_part]
  7774.            \ubegin\n
  7775.                sequence_of_statements
  7776.           [\uexception\n
  7777.                exception_handler
  7778.               {exception_handler}]
  7779.            \uend\n [block_simple_name];
  7780. If a block statement has a block \vsimple name\v401.,  this  simple  name  must  be
  7781. given both at the beginning and at the end.
  7782. The  execution  of  a  block  statement  consists of the elaboration of its
  7783. declarative part (if any) followed by the  execution  of  the  sequence  of
  7784. statements.   If  the block statement has exception handlers, these service
  7785. corresponding exceptions that  are  raised  during  the  execution  of  the
  7786. sequence of statements (see 11.2).
  7787. Example:
  7788.     SWAP:
  7789.        \udeclare\n
  7790.           TEMP : INTEGER;
  7791.        \ubegin\n
  7792.           TEMP := V; V := U; U := TEMP;
  7793.        \uend\n SWAP;
  7794. \uNotes:\n
  7795. If  \vtask  objects\v902.  are declared within a block statement whose execution is
  7796. completed, the block statement is not left until all  its  \vdependent  tasks\v904.
  7797. are terminated (see 9.4).  This rule applies also to a completion caused by
  7798. an \vexit\v508., \vreturn\v509., or \vgoto statement\v510.;  or by the \vraising of an exception\v1100..
  7799. Within  a  block  statement,  the  block name can be used in \vexpanded names\v404.
  7800. denoting local entities such as SWAP.TEMP in the above example  (see  4.1.3
  7801. (f)).
  7802. 5.7  \uExit Statements\n
  7803. An exit statement is used to complete the execution of  an  enclosing  \vloop\v506.
  7804. \vstatement\v506. (called the loop in what follows);  the completion is conditional
  7805. if the exit statement includes a \vcondition\v504..
  7806.     exit_statement ::=
  7807.        \uexit\n [loop_name] [\uwhen\n condition];
  7808. An  exit  statement with a \vloop name\v506. is only allowed within the named loop,
  7809. and applies to that loop;  an exit statement without a loop  name  is  only
  7810. allowed within a loop, and applies to the innermost enclosing loop (whether
  7811. named or not).  Furthermore, an exit statement that applies to a given loop
  7812. must  not appear within a \vsubprogram body\v603., \vpackage body\v701., task body, \vgeneric\v1201.
  7813. \vbody\v1201., or \vaccept statement\v905., if this construct  is  itself  enclosed  by  the
  7814. given loop.
  7815. For the execution of an exit statement, the condition, if present, is first
  7816. evaluated.   Exit from the loop then takes place if the value is \vTRUE\v313. or if
  7817. there is no condition.
  7818. \uExamples:\n
  7819.     \ufor\n N \uin\n 1 .. MAX_NUM_ITEMS \uloop\n
  7820.        GET_NEW_ITEM(NEW_ITEM);
  7821.        MERGE_ITEM(NEW_ITEM, STORAGE_FILE);
  7822.        \uexit when\n NEW_ITEM = TERMINAL_ITEM;
  7823.     \uend loop\n;
  7824.     MAIN_CYCLE:
  7825.        \uloop\n
  7826.           --  initial statements
  7827.           \uexit\n MAIN_CYCLE \uwhen\n FOUND;
  7828.           --  final statements
  7829.        \uend loop\n MAIN_CYCLE;
  7830. Note:
  7831. Several nested loops can be exited by an  exit  statement  that  names  the
  7832. outer loop.
  7833. 5.8  \uReturn Statements\n
  7834. A  return  statement  is  used  to  complete the execution of the innermost
  7835. enclosing function, procedure, or \vaccept statement\v905..
  7836.     return_statement ::= \ureturn\n [expression];
  7837. A return statement is only allowed within  the  body  of  a  \vsubprogram\v603.  or
  7838. generic  subprogram,  or  within  an  accept  statement, and applies to the
  7839. innermost (enclosing) such construct;  a return statement  is  not  allowed
  7840. within  the  body  of a \vtask unit\v901.,  \vpackage\v701., or generic package enclosed by
  7841. this construct (on  the  other  hand,  it  is  allowed  within  a  compound
  7842. statement  enclosed  by  this  construct  and,  in  particular,  in a \vblock\v507.
  7843. \vstatement\v507.).
  7844. A return statement for an accept statement or for the body of  a  \vprocedure\v603.
  7845. or  generic  procedure  must not include an \vexpression\v410..  A return statement
  7846. for the body of a \vfunction\v603. or generic function must include an  expression.
  7847. The  value  of  the expression defines the result returned by the function.
  7848. The type of this expression must be the base type of the  \vtype  mark\v307.  given
  7849. after  the  \vreserved  word\v211.  return  in the specification of the function or
  7850. generic function (this type mark defines the \vresult subtype\v601.).
  7851. For the execution of a return statement, the expression (if any)  is  first
  7852. evaluated and a check is made that the value belongs to the result \vsubtype\v305..
  7853. The  execution  of  the  return statement is thereby completed if the check
  7854. succeeds;  so also is the execution of the  subprogram  or  of  the  accept
  7855. statement.   The  \vexception  CONSTRAINT_ERROR\v1101. is raised at the place of the
  7856. return statement if the check fails.
  7857. \uExamples:\n
  7858.     \ureturn\n;                         -- in a procedure
  7859.     \ureturn\n KEY_VALUE(LAST_INDEX);   -- in a function
  7860. Note:
  7861. If the expression is either a  \vnumeric  literal\v204.  or  \vnamed  number\v302.,  or  an
  7862. \vattribute\v1500. that yields a result of \vtype universal_integer\v314. or \vuniversal_real\v316.,
  7863. then  an  \vimplicit  conversion\v419.  of  the result is performed as described in
  7864. section 4.6.
  7865. 5.9  \uGoto Statements\n
  7866. A goto statement specifies  an  explicit  \vtransfer  of  control\v501.  from  this
  7867. \vstatement\v501. to a target statement named by a \vlabel\v501..
  7868.     goto_statement ::= \ugoto\n label_name;
  7869. The  innermost  \vsequence  of  statements\v501. that encloses the target statement
  7870. must also enclose the goto statement (note that the goto statement can be a
  7871. statement of an inner sequence).   Furthermore,  if  a  goto  statement  is
  7872. enclosed  by  an  \vaccept  statement\v905. or the body of a \vprogram unit\v600., then the
  7873. target statement must not be outside this enclosing construct;  conversely,
  7874. it follows from the previous rule that if the target statement is  enclosed
  7875. by such a construct, then the goto statement cannot be outside.
  7876. The  execution  of  a  goto statement transfers control to the named target
  7877. statement.
  7878. Note:
  7879. The above rules allow transfer of control to a statement  of  an  enclosing
  7880. sequence  of  statements  but  not  the  reverse.  Similarly, they prohibit
  7881. transfers of control such as between alternatives of a \vcase  statement\v505.,  \vif\v504.
  7882. \vstatement\v504.,  or  \vselect  statement\v907.;  between \vexception handlers\v1102.;  or from an
  7883. exception handler of a \vframe\v1102. back to the sequence  of  statements  of  this
  7884. frame.
  7885. Example:
  7886.     <<COMPARE>>
  7887.        \uif\n A(I) < ELEMENT \uthen\n
  7888.           \uif\n LEFT(I) /= 0 \uthen\n
  7889.              I := LEFT(I);
  7890.              \ugoto\n COMPARE;
  7891.           \uend if\n;
  7892.           --  some statements
  7893.        \uend if\n;
  7894. 6.       \uSubprograms\n
  7895. Subprograms  are  one  of the four forms of program unit, of which programs
  7896. can be composed.  The other forms are \vpackages\v700.,  \vtask  units\v900.,  and \vgeneric\v1200.
  7897. \vunits\v1200..
  7898. A  subprogram  is a program unit whose execution is invoked by a \vsubprogram\v606.
  7899. \vcall\v606..  There are two forms of  subprogram:  \vprocedures\v601.  and  \vfunctions\v609..   A
  7900. \vprocedure  call\v606.  is  a  statement;   a  \vfunction  call\v606. is an expression and
  7901. returns a value.  The definition of a subprogram can be given in two parts:
  7902. a \vsubprogram declaration\v601. defining its calling conventions, and a \vsubprogram\v603.
  7903. \vbody\v603. defining its execution.
  7904. More details:
  7905.  6.1    \vSubprogram Declarations\v601.
  7906.  6.2    \vFormal Parameter Modes\v602.
  7907.  6.3    \vSubprogram Bodies\v603.
  7908.  6.4    \vSubprogram Calls\v606.
  7909.  6.5    \vFunction Subprograms\v609.
  7910.  6.6    \vParameter and Result Type Profile - Overloading of Subprograms\v610.
  7911.  6.7    \vOverloading of Operators\v611.
  7912. 6.1  \uSubprogram Declarations\n
  7913. A subprogram \vdeclaration\v301. declares a \vprocedure\v600. or a \vfunction\v609.,  as  indicated
  7914. by the initial reserved word.
  7915.     subprogram_declaration ::= subprogram_specification;
  7916.     subprogram_specification ::=
  7917.          procedure identifier [formal_part]
  7918.        | function designator  [formal_part] \ureturn\n \vtype_mark\v307.
  7919.     designator ::= identifier | operator_symbol
  7920.     operator_symbol ::= \vstring_literal\v208.
  7921.     formal_part ::=
  7922.        (parameter_specification {; parameter_specification})
  7923.     parameter_specification ::=
  7924.        \videntifier_list\v302. : mode type_mark [:= expression]
  7925.     mode ::= [\uin\n] | \uin out\n | \uout\n
  7926. The  specification  of  a procedure specifies its \videntifier\v203. and its \vformal\v602.
  7927. \vparameters\v602. (if  any).   The  specification  of  a  function  specifies  its
  7928. designator,  its formal parameters (if any) and the subtype of the returned
  7929. value (the result subtype).  A designator that is  an  \voperator\v411.  symbol  is
  7930. used  for  the  \voverloading\v610.  of  an  operator.   The sequence of characters
  7931. represented by an operator symbol must be an operator belonging to  one  of
  7932. the  six  classes  of  overloadable operators defined in section 4.5 (extra
  7933. spaces are not allowed and the case of letters is not significant).
  7934. A parameter specification with  several  identifiers  is  equivalent  to  a
  7935. sequence  of  single parameter specifications, as explained in section 3.2.
  7936. Each single parameter specification declares a  formal  parameter.   If  no
  7937. \vmode\v602.  is  explicitly  given,  the  mode  in  is  assumed.   If  a parameter
  7938. specification ends with  an  \vexpression\v410.,  the  expression  is  the  default
  7939. expression  of  the formal parameter.  A default expression is only allowed
  7940. in a parameter specification if the  mode  is  in  (whether  this  mode  is
  7941. indicated explicitly or implicitly).  The type of a default expression must
  7942. be that of the corresponding formal parameter.
  7943. The use of a \vname\v401. that denotes a formal parameter is not allowed in default
  7944. expressions  of  a  formal  part  if  the specification of the parameter is
  7945. itself given in this formal part.
  7946. The \velaboration\v333. of a subprogram declaration  elaborates  the  corresponding
  7947. formal part.  The \velaboration of a formal part has no other effect\v333..
  7948. Examples of subprogram declarations:
  7949.     \uprocedure\n TRAVERSE_TREE;
  7950.     \uprocedure\n INCREMENT(X : \uin out\n INTEGER);
  7951.     \uprocedure\n RIGHT_INDENT(MARGIN : \uout\n LINE_SIZE);          --  see 3.5.4
  7952.     \uprocedure\n SWITCH(FROM, TO : \uin out\n LINK);                --  see 3.8.1
  7953.     \ufunction\n RANDOM \ureturn\n PROBABILITY;                      --  see 3.5.7
  7954.     \ufunction\n MIN_CELL(X : LINK) \ureturn\n CELL;                 --  see 3.8.1
  7955.     \ufunction\n NEXT_FRAME(K : POSITIVE) \ureturn\n FRAME;          --  see 3.8
  7956.     \ufunction\n DOT_PRODUCT(LEFT,RIGHT: VECTOR) \ureturn\n REAL;    --  see 3.6
  7957.     \ufunction\n "*"(LEFT,RIGHT : MATRIX) \ureturn\n MATRIX;         --  see 3.6
  7958. Examples of in parameters with default expressions:
  7959.  \uprocedure\n PRINT_HEADER(PAGES  : \uin\n NATURAL;
  7960.                 HEADER : \uin\n LINE    :=  (1 .. LINE'LAST => ' '); -- see 3.6
  7961.                 CENTER : \uin\n BOOLEAN := TRUE);
  7962. \uNotes:\n
  7963. The  \vevaluation\v411.  of  default  expressions  is  caused by certain \vsubprogram\v606.
  7964. \vcalls\v606., as described in section 6.4.2 (default expressions are not evaluated
  7965. during the elaboration of the subprogram declaration).
  7966. All subprograms can be called recursively and are reentrant.
  7967. 6.2  \uFormal Parameter Modes\n
  7968. The value of an \vobject\v302. is said to be read when this value is \vevaluated\v411.;  it
  7969. is  also  said to be read when one of its \vsubcomponents\v305. is read.  The value
  7970. of a \vvariable\v303. is said to be updated when an \vassignment\v502. is performed to  the
  7971. variable,  and  also  (indirectly)  when  the  variable  is  used as \vactual\v607.
  7972. \vparameter\v607. of a \vsubprogram call\v606. or \ventry call  statement\v905.  that  updates  its
  7973. value;   it  is  also  said  to be updated when one of its subcomponents is
  7974. updated.
  7975. A \vformal parameter\v601. of a subprogram has one of the three following \vmodes\v601.:
  7976.  \uin\n       The formal parameter  is a  constant  and  permits   only reading
  7977.           of the value  of the associated actual parameter.
  7978.  \uin out\n   The  formal parameter is a variable  and permits both reading and
  7979.           updating of the  value of the associated actual parameter.
  7980.  \uout\n      The  formal  parameter is a variable  and permits updating of the
  7981.           value of the associated actual parameter.
  7982.           The value  of  a scalar parameter that is not updated by the call
  7983.           is undefined  upon return;  the  same  holds for the  value  of a
  7984.           scalar subcomponent,  other  than a  \vdiscriminant\v326..   Reading  the
  7985.           bounds and discriminants  of the  formal  parameter  and  of  its
  7986.           subcomponents is allowed,  but no other reading.
  7987. For a scalar parameter, the above effects are achieved  by  copy:   at  the
  7988. start  of  each  call, if the mode is in or in out, the value of the actual
  7989. parameter is copied into  the  associated  formal  parameter;   then  after
  7990. normal completion of the \vsubprogram body\v603., if the mode is in out or out, the
  7991. value  of  the  formal  parameter is copied back into the associated actual
  7992. parameter.  For a parameter whose type is an \vaccess type\v330., copy-in  is  used
  7993. for all three modes, and copy-back for the modes in out and out.
  7994. For  a  parameter  whose  type  is  an  \varray\v321.,  \vrecord\v325.,  or  \vtask type\v902., an
  7995. implementation may likewise achieve the  above  effects  by  copy,  as  for
  7996. \vscalar  types\v310..   In  addition, if copy is used for a parameter of mode out,
  7997. then copy-in is required at least for the bounds and discriminants  of  the
  7998. actual  parameter  and of its subcomponents, and also for each subcomponent
  7999. whose type is an access type.  Alternatively, an implementation may achieve
  8000. these effects by reference, that is, by arranging that  every  use  of  the
  8001. formal  parameter  (to  read or to update its value) be treated as a use of
  8002. the associated actual parameter, throughout the execution of the subprogram
  8003. call.  The language does not define which of these two mechanisms is to  be
  8004. adopted  for  parameter  passing,  nor  whether different calls to the same
  8005. subprogram are to use the same mechanism.  The execution of  a  program  is
  8006. \verroneous\v108.  if  its  effect  depends  on  which mechanism is selected by the
  8007. implementation.
  8008. For a parameter whose type  is  a  \vprivate  type\v704.,  the  above  effects  are
  8009. achieved  according to the rule that applies to the corresponding full type
  8010. declaration.
  8011. Within the body of a subprogram, a  formal  parameter  is  subject  to  any
  8012. \vconstraint\v305.   resulting   from   the   \vtype  mark\v307.  given  in  its  \vparameter\v601.
  8013. \vspecification\v601..  For a formal parameter of an \vunconstrained array type\v321.,  the
  8014. bounds  are obtained from the actual parameter, and the formal parameter is
  8015. constrained by these \vbounds (see 3.6.1)\v322..   For  a  formal  parameter  whose
  8016. declaration  specifies  an  \vunconstrained  (private  or  record)  type with\v326.
  8017. \vdiscriminants\v326., the discriminants of the formal  parameter  are  initialized
  8018. with the values of the corresponding discriminants of the actual parameter;
  8019. the  formal parameter is unconstrained if and only if the mode is in out or
  8020. out and the variable  name  given  for  the  actual  parameter  denotes  an
  8021. \vunconstrained variable\v303. (see 3.7.1 and 6.4.1).
  8022. If the actual parameter of a subprogram call is a subcomponent that \vdepends\v326.
  8023. \von discriminants\v326. of an unconstrained record variable, then the execution of
  8024. the  call  is  erroneous  if  the  value of any of the discriminants of the
  8025. variable is changed by this execution;  this rule does  not  apply  if  the
  8026. mode  is  in and the type of the subcomponent is a scalar type or an access
  8027. type.
  8028. \uNotes:\n
  8029. For parameters of array and record types, the parameter passing rules  have
  8030. these consequences:
  8031.   -  If the execution of a subprogram  is  abandoned  as  a  result  of  an
  8032.      \vexception\v1100.,  the  final value of an actual parameter of such a type can
  8033.      be either its value before the call or a value assigned to the  formal
  8034.      parameter during the execution of the subprogram.
  8035.   -  If no actual parameter of such a type is accessible by more  than  one
  8036.      path,  then  the effect of a subprogram call (unless abandoned) is the
  8037.      same whether or not the  implementation  uses  copying  for  parameter
  8038.      passing.   If,  however,  there  are  multiple  access paths to such a
  8039.      parameter (for example,  if  a  \vglobal\v801.  variable,  or  another  formal
  8040.      parameter, refers to the same actual parameter), then the value of the
  8041.      formal  is  undefined after updating the actual other than by updating
  8042.      the formal.  A program using such an undefined value is erroneous.
  8043. The same parameter modes are defined for formal parameters of entries  (see
  8044. 9.5)  with  the same meaning as for subprograms.  Different parameter modes
  8045. are defined for \vgeneric formal parameters\v1201..
  8046. For all modes, if an actual parameter designates  a  \vtask\v900.,  the  associated
  8047. formal   parameter  designates  the  same  task;   the  same  holds  for  a
  8048. subcomponent of an actual parameter and the corresponding  subcomponent  of
  8049. the associated formal parameter.
  8050. 6.3  \uSubprogram Bodies\n
  8051. A \vsubprogram\v600. body specifies the execution of a subprogram.
  8052.     subprogram_body ::=
  8053.         subprogram_specification \uis\n
  8054.            [declarative_part]
  8055.         \ubegin\n
  8056.             sequence_of_statements
  8057.        [\uexception\n
  8058.             exception_handler
  8059.            {exception_handler}]
  8060.         \uend\n [designator];
  8061. The  \vdeclaration\v301.  of  a  subprogram  is optional.  In the absence of such a
  8062. declaration, the \vsubprogram specification\v601. of the subprogram body  (or  \vbody\v1004.
  8063. \vstub\v1004.) acts as the declaration.  For each \vsubprogram declaration\v601., there must
  8064. be  a  corresponding  body  (except  for  a  subprogram  written in another
  8065. language, as explained in section 13.9).  If both a declaration and a  body
  8066. are  given,  the  subprogram  specification of the body must \vconform\v604. to the
  8067. subprogram  specification  of  the  declaration  (see  section  6.3.1   for
  8068. conformance rules).
  8069. If a \vdesignator\v601. appears at the end of a subprogram body, it must repeat the
  8070. designator of the subprogram specification.
  8071. The  \velaboration\v333. of a subprogram body has no other effect than to establish
  8072. that the body can from then on be used for the execution of  calls  of  the
  8073. subprogram.
  8074. The  execution  of  a  subprogram  body is  invoked by  a  \vsubprogram call\v606..
  8075. For  this   execution,   after   establishing   the   association   between
  8076. \vformal  parameters\v601.  and \vactual parameters\v607., the \vdeclarative part\v333. of the body
  8077. is elaborated, and the \vsequence of statements\v501. of the body is then executed.
  8078. Upon completion of the body,   return  is  made  to  the  caller  (and  any
  8079. necessary  copying  back  of formal to actual parameters occurs (see 6.2)).
  8080. The optional \vexception handlers\v1102. at the end  of  a  subprogram  body  handle
  8081. \vexceptions\v1100. raised during the execution of the sequence of statements of the
  8082. subprogram body (see 11.4).
  8083. Note:
  8084. It  follows  from  the  \vvisibility\v803. rules that if a subprogram declared in a
  8085. \vpackage\v700. is to be visible outside the package,  a  subprogram  specification
  8086. must  be  given in the \vvisible part\v702. of the package.  The same rules dictate
  8087. that a subprogram declaration must be given if a  call  of  the  subprogram
  8088. occurs  textually  before  the  subprogram  body (the declaration must then
  8089. occur earlier than the call in the  program  text).   The  rules  given  in
  8090. sections   3.9  and  7.1  imply  that  a  subprogram  declaration  and  the
  8091. corresponding body must both \voccur immediately\v801. \vwithin\v801. the same  \vdeclarative\v801.
  8092. \vregion\v801..
  8093. Example of subprogram body:
  8094.     \uprocedure\n PUSH(E : \uin\n ELEMENT_TYPE; S : \uin out\n STACK) \uis\n
  8095.     \ubegin\n
  8096.        \uif\n S.INDEX = S.SIZE \uthen\n
  8097.           \uraise\n STACK_OVERFLOW;
  8098.        \uelse\n
  8099.           S.INDEX := S.INDEX + 1;
  8100.           S.SPACE(S.INDEX) := E;
  8101.        \uend if\n;
  8102.     \uend\n PUSH;
  8103. More details:
  8104.  6.3.1  \vConformance Rules\v604.
  8105.  6.3.2  \vInline Expansion of Subprograms\v605.
  8106. 6.3.1  \uConformance Rules\n
  8107. Whenever the language rules require or \vallow\v108. the specification of  a  given
  8108. subprogram  to be provided in more than one place, the following variations
  8109. are allowed at each place:
  8110.   -  A \vnumeric literal\v204. can be replaced by a different  numeric  literal  if
  8111.      and only if both have the same value.
  8112.   -  A \vsimple name\v401. can be replaced by an \vexpanded name\v404. in which this simple
  8113.      \vname\v401. is the \vselector\v404., if and only if at both places the meaning of the
  8114.      simple name is given by the same \vdeclaration\v301..
  8115.   -  A string literal given as an \voperator symbol\v601.  can  be  replaced  by  a
  8116.      different  string  literal  if  and  only  if  both represent the same
  8117.      operator.
  8118. Two \vsubprogram specifications\v601. are said to conform if, apart  from  \vcomments\v209.
  8119. and  the  above  allowed  variations, both specifications are formed by the
  8120. same sequence of \vlexical elements\v200., and corresponding lexical  elements  are
  8121. given the same meaning by the \vvisibility\v803. and \voverloading\v610. rules.
  8122. Conformance  is  likewise defined for \vformal parts\v601., \vdiscriminant parts\v326., and
  8123. type marks (for \vdeferred constants\v707. and for \vactual parameters\v606. that have  the
  8124. form of a \vtype conversion\v419. (see 6.4.1)).
  8125. \uNotes:\n
  8126. A  simple  name can be replaced by an expanded name even if the simple name
  8127. is itself the \vprefix\v401. of a \vselected component\v404..   For  example,  Q.R  can  be
  8128. replaced by P.Q.R if Q is declared immediately within P.
  8129. The  following  specifications  do not conform since they are not formed by
  8130. the same sequence of lexical elements:
  8131.     \uprocedure\n P(X,Y : INTEGER)
  8132.     \uprocedure\n P(X : INTEGER; Y : INTEGER)
  8133.     \uprocedure\n P(X,Y : \uin\n INTEGER)
  8134. 6.3.2  \uInline Expansion of Subprograms\n
  8135. The  \vpragma\v210.  INLINE  is  used  to  indicate  that  inline  expansion of the
  8136. \vsubprogram body\v603. is desired for every call of each of the named \vsubprograms\v600..
  8137. The form of this pragma is as follows:
  8138.     \upragma\n INLINE (name {, name});
  8139. Each \vname\v401. is either the name of a subprogram  or  the  name  of  a  \vgeneric\v1201.
  8140. \vsubprogram\v1201..   The  pragma  INLINE  is  only  \vallowed\v108.  at  the  place  of  a
  8141. \vdeclarative item\v333. in a \vdeclarative part\v333. or \vpackage specification\v701., or after a
  8142. \vlibrary unit\v1001. in a \vcompilation\v1001., but before any subsequent \vcompilation\v1001.  \vunit\v1001..
  8143. If  the  pragma  appears at the place of a declarative item, each name must
  8144. denote a  subprogram  or  a  generic  subprogram  declared  by  an  earlier
  8145. declarative item of the same declarative part or package specification.  If
  8146. several  (\voverloaded\v610.)  subprograms  satisfy  this  requirement,  the pragma
  8147. applies to all of them.  If the pragma appears after a given library  unit,
  8148. the  only  name allowed is the name of this unit.  If the name of a generic
  8149. subprogram is mentioned in the pragma, this indicates that inline expansion
  8150. is desired for calls of all subprograms obtained by  \vinstantiation\v1206.  of  the
  8151. named \vgeneric unit\v1200..
  8152. The  meaning of a subprogram is not changed by the pragma INLINE.  For each
  8153. call of the named subprograms, an implementation is free to  follow  or  to
  8154. ignore  the  recommendation expressed by the pragma.  (Note, in particular,
  8155. that the recommendation  cannot  generally  be  followed  for  a  recursive
  8156. subprogram.)
  8157. 6.4  \uSubprogram Calls\n
  8158. A  \vsubprogram\v600. call is either a procedure call statement or a function call;
  8159. it invokes the execution of the corresponding subprogram  body.   The  call
  8160. specifies  the  association  of  the actual parameters, if any, with \vformal\v601.
  8161. \vparameters\v601. of the subprogram.
  8162.     procedure_call_statement ::=
  8163.         procedure_name [actual_parameter_part];
  8164.     function_call ::=
  8165.         function_name [actual_parameter_part]
  8166.     actual_parameter_part ::=
  8167.         (parameter_association {, parameter_association})
  8168.     parameter_association ::=
  8169.        [formal_parameter =>] actual_parameter
  8170.     formal_parameter ::= parameter_simple_name
  8171.     actual_parameter ::=
  8172.        \vexpression\v410. | \vvariable_name\v303. | \vtype_mark\v307.(variable_name)
  8173. Each  parameter  association  associates  an  actual   parameter   with   a
  8174. corresponding  formal  parameter.   A  parameter  association is said to be
  8175. named if the formal parameter is named explicitly;  it is otherwise said to
  8176. be  positional.   For  a  positional  association,  the  actual   parameter
  8177. corresponds  to  the  formal parameter with the same position in the \vformal\v601.
  8178. \vpart\v601..
  8179. Named associations can be given in any order, but if  both  positional  and
  8180. named  associations are used in the same call, positional associations must
  8181. occur first, at their normal position.  Hence once a named  association  is
  8182. used, the rest of the call must use only named associations.
  8183. For  each  formal parameter of a subprogram, a subprogram call must specify
  8184. exactly one corresponding  actual  parameter.   This  actual  parameter  is
  8185. specified either explicitly, by a parameter association, or, in the absence
  8186. of such an association, by a \vdefault expression\v601. (see 6.4.2).
  8187. The parameter associations of a subprogram call are evaluated in some order
  8188. that  is not defined by the language.  Similarly, the language rules do not
  8189. define in which order the values of in out or  out  parameters  are  copied
  8190. back into the corresponding actual parameters (when this is done).
  8191. Examples of procedure calls:
  8192.   TRAVERSE_TREE;                                               --  see 6.1
  8193.   TABLE_MANAGER.INSERT(E);                                     --  see 7.5
  8194.   PRINT_HEADER(128, TITLE, TRUE);                              --  see 6.1
  8195.   SWITCH(FROM => X, TO => NEXT);                               --  see 6.1
  8196.   PRINT_HEADER(128, HEADER => TITLE, CENTER => TRUE            --  see 6.1
  8197.   PRINT_HEADER(HEADER => TITLE, CENTER => TRUE, PAGES => 128); --  see 6.1
  8198. Examples of function calls:
  8199.     DOT_PRODUCT(U, V)   --  see 6.1 and 6.5
  8200.     CLOCK               --  see 9.6
  8201. More details:
  8202.  6.4.1  \vParameter Associations\v607.
  8203.  6.4.2  \vDefault Parameters\v608.
  8204. 6.4.1  \uParameter Associations\n
  8205. Each  \vactual  parameter\v606. must have the same \vtype\v305. as the corresponding \vformal\v601.
  8206. \vparameter\v601..
  8207. An actual \vparameter associated\v606. with a formal parameter of \vmode\v601. in  must  be
  8208. an \vexpression\v410.;  it is evaluated before the call.
  8209. An  actual  parameter  associated with a formal parameter of mode in out or
  8210. out must be either the \vname\v401. of a  \vvariable\v303.,  or  of  the  form  of  a  \vtype\v419.
  8211. \vconversion\v419.  whose  argument is the name of a variable.  In either case, for
  8212. the mode in out, the variable must not be a formal parameter of mode out or
  8213. a subcomponent thereof.  For an actual parameter that has  the  form  of  a
  8214. type conversion, the \vtype mark\v307. must \vconform\v604. to the type mark of
  8215. he formal parameter;  the allowed operand and target types are the same as
  8216. for type conversions (see 4.6).
  8217. The  variable  name  given for an actual parameter of mode in out or out is
  8218. evaluated before the call.  If the actual parameter has the form of a  type
  8219. conversion,  then  before  the  call,  for  a parameter of mode in out, the
  8220. variable is converted to the specified type;  after (normal) completion  of
  8221. the  subprogram  body,  for  a  parameter of mode in out or out, the formal
  8222. parameter is converted back  to  the  type  of  the  variable.   (The  type
  8223. specified in the conversion must be that of the formal parameter.)
  8224. The  following \vconstraint\v305. checks are performed for parameters of scalar and
  8225. access types:
  8226.   -  Before the call:  for a parameter of mode in or in out, it is  checked
  8227.      that  the  value of the actual parameter belongs to the \vsubtype\v305. of the
  8228.     formal parameter.
  8229.   -  After (normal) completion of the subprogram body:  for a parameter  of
  8230.      mode  in  out  or  out,  it  is  checked  that the value of the formal
  8231.      parameter belongs to the subtype of the actual variable.  In the  case
  8232.      of  a  type conversion, the value of the formal parameter is converted
  8233.      back and the check applies to the result of the conversion.
  8234. In each of the above cases, the execution of the program  is  \verroneous\v108.  if
  8235. the checked \vvalue is undefined\v303..
  8236. For  other  types,  for  all  modes, a check is made before the call as for
  8237. scalar and access types;  no check is made upon return.
  8238. The \vexception CONSTRAINT_ERROR\v1101. is raised at the  place  of  the  subprogram
  8239. call if either of these checks fails.
  8240. Note:
  8241. For \varray types\v321. and for types with \vdiscriminants\v326., the check before the call
  8242. is  sufficient (a check upon return would be redundant) if the type mark of
  8243. the formal parameter denotes a \vconstrained  subtype\v305.,  since  neither  \varray\v321.
  8244. \vbounds\v321. nor discriminants can then vary.
  8245. If this type mark denotes an \vunconstrained array type\v321., the formal parameter
  8246. is constrained with the bounds of the corresponding actual parameter and no
  8247. check  (neither  before  the  call  nor upon return) is needed (see 3.6.1).
  8248. Similarly, no check is needed if the type  mark  denotes  an  \vunconstrained\v326.
  8249. \vtype  with  discriminants\v326.,  since  the formal parameter is then constrained
  8250. exactly as the corresponding actual parameter (see 3.7.1).
  8251. 6.4.2  \uDefault Parameters\n
  8252. If a \vparameter specification\v601. includes a default expression for a  parameter
  8253. of  \vmode\v601.  in,  then  corresponding  \vsubprogram  calls\v606.  need  not  include a
  8254. \vparameter association\v606. for the parameter.  If  a  parameter  association  is
  8255. thus  omitted from a call, then the rest of the call, following any initial
  8256. \vpositional associations\v606., must use only \vnamed associations\v606..
  8257. For any omitted parameter association, the default expression is  evaluated
  8258. before  the  call  and  the  resulting  value is used as an implicit \vactual\v607.
  8259. \vparameter\v607..
  8260. Examples of procedures with default values:
  8261.     \uprocedure\n ACTIVATE(PROCESS : \uin\n PROCESS_NAME;
  8262.                        AFTER   : \uin\n PROCESS_NAME := NO_PROCESS;
  8263.                        WAIT    : \uin\n DURATION := 0.0;
  8264.                        PRIOR   : \uin\n BOOLEAN := FALSE);
  8265.     \uprocedure\n PAIR(LEFT, RIGHT : PERSON_NAME := \unew\n PERSON);
  8266. Examples of their calls:
  8267.     ACTIVATE(X);
  8268.     ACTIVATE(X, AFTER => Y);
  8269.     ACTIVATE(X, WAIT => 60.0, PRIOR => TRUE);
  8270.     ACTIVATE(X, Y, 10.0, FALSE);
  8271.     PAIR;
  8272.     PAIR(LEFT => \unew\n PERSON, RIGHT => \unew\n PERSON);
  8273. Note:
  8274. If a default expression is used for two or more parameters  in  a  multiple
  8275. parameter  specification, the default expression is evaluated once for each
  8276. omitted parameter.  Hence in the above examples, the two calls of PAIR  are
  8277. equivalent.
  8278. 6.5  \uFunction Subprograms\n
  8279. A \vfunction\v601. is a subprogram that returns a value (the result of the \vfunction\v606.
  8280. \vcall\v606.).   The  \vspecification  of  a  function\v601.  starts with the reserved word
  8281. function, and the parameters, if any, must have the \vmode\v601. in  (whether  this
  8282. mode  is  specified  explicitly  or  implicitly).   The  \vstatements\v500.  of the
  8283. \vfunction body\v603. (excluding statements of program units that are inner to  the
  8284. function  body)  must  include one or more \vreturn statements\v509. specifying the
  8285. returned value.
  8286. The \vexception PROGRAM_ERROR\v1101. is raised if a function body is left  otherwise
  8287. than  by  a  return statement.  This does not apply if the execution of the
  8288. function is abandoned as a result of an \vexception\v1100..
  8289. Example:
  8290.     \ufunction\n DOT_PRODUCT(LEFT, RIGHT : VECTOR) \ureturn\n REAL \uis\n
  8291.        SUM : REAL := 0.0;
  8292.     \ubegin\n
  8293.        CHECK(LEFT'FIRST = RIGHT'FIRST \uand\n LEFT'LAST = RIGHT'LAST);
  8294.        \ufor\n J \uin\n LEFT'RANGE \uloop\n
  8295.           SUM := SUM + LEFT(J)*RIGHT(J);
  8296.        \uend loop\n;
  8297.        \ureturn\n SUM;
  8298.     \uend\n DOT_PRODUCT;
  8299. 6.6  \uParameter and Result Type Profile - Overloading of Subprograms\n
  8300. Two  formal  parts  are said to have the same parameter type profile if and
  8301. only if they have the same number of  parameters,  and  at  each  parameter
  8302. position corresponding parameters have the same \vbase type\v305..  A \vsubprogram\v600. or
  8303. \ventry\v905.  has the same parameter and result \vtype\v305. profile as another subprogram
  8304. or entry if and only if both have the  same  parameter  type  profile,  and
  8305. either both are \vfunctions\v609. with the same result base type, or neither of the
  8306. two is a function.
  8307. The  same  subprogram  identifier or \voperator symbol\v601. can be used in several
  8308. \vsubprogram specifications\v601..  The \videntifier\v203. or operator symbol is then  said
  8309. to  be  \voverloaded\v807.;   the subprograms that have this identifier or operator
  8310. symbol are also said to be overloaded  and  to  overload  each  other.   As
  8311. explained  in  section  8.3, if two subprograms overload each other, one of
  8312. them can hide the other only if both subprograms have  the  same  parameter
  8313. and  result  type  profile (see section 8.3 for the other requirements that
  8314. must be met for \vhiding\v803.).
  8315. A call to an overloaded subprogram is ambiguous (and therefore \villegal\v108.)  if
  8316. the  name  of  the  subprogram,  the  number of \vparameter associations\v606., the
  8317. types and the order of the \vactual  parameters\v607.,  the  names  of  the  \vformal\v601.
  8318. \vparameters\v601.  (if  named  associations  are  used),  and the result type (for
  8319. functions)  are  not  sufficient  to  determine  exactly  one  (overloaded)
  8320. subprogram specification.
  8321. Examples of overloaded subprograms:
  8322.     \uprocedure\n PUT(X : INTEGER);
  8323.     \uprocedure\n PUT(X : STRING);
  8324.     \uprocedure\n SET(TINT   : COLOR);
  8325.     \uprocedure\n SET(SIGNAL : LIGHT);
  8326. Examples of calls:
  8327.     PUT(28);
  8328.     PUT("no possible ambiguity here");
  8329.     SET(TINT   => RED);
  8330.     SET(SIGNAL => RED);
  8331.     SET(COLOR'(RED));
  8332.     --  SET(RED) would be ambiguous since RED may
  8333.     --  denote a value either of type COLOR or of type LIGHT
  8334. \uNotes:\n
  8335. The  notion of parameter and result type profile does not include parameter
  8336. names, parameter modes, parameter subtypes, default expressions  and  their
  8337. presence or absence.
  8338. Ambiguities  may (but need not) arise when actual parameters of the call of
  8339. an  overloaded  subprogram  are  themselves  overloaded   \vfunction   calls\v606.,
  8340. \vliterals\v406.,  or  \vaggregates\v407..  Ambiguities may  also (but need not) arise when
  8341. several overloaded subprograms belonging to different \vpackages\v700. are visible.
  8342. These ambiguities can usually  be  resolved  in  several  ways:   \vqualified\v420.
  8343. \vexpressions\v420.  can  be  used  for  some or all actual parameters, and for the
  8344. result, if  any;   the  name  of  the  subprogram  can  be  expressed  more
  8345. explicitly as an expanded name;  finally, the subprogram can be renamed.
  8346. 6.7  \uOverloading of Operators\n
  8347. The \vdeclaration\v301. of a function whose \vdesignator\v601. is  an  \voperator symbol\v601.  is
  8348. used  to  overload an \voperator\v411..  The sequence of \vcharacters\v201. of the operator
  8349. symbol must be either a \vlogical\v411., a \vrelational\v411., a  \vbinary  adding\v411.,  a  \vunary\v411.
  8350. \vadding\v411., a \vmultiplying\v411., or a \vhighest precedence operator\v411..  Neither
  8351. \vmembership  tests\v411.  nor  the  \vshort-circuit  control  forms\v411.  are  \vallowed\v108. as
  8352. function designators.
  8353. The subprogram specification  of  a  unary  operator  must  have  a  single
  8354. parameter.  The subprogram specification of a binary operator must have two
  8355. parameters;   for  each use of this operator, the first parameter takes the
  8356. left operand as \vactual parameter\v607., the  second  parameter  takes  the  right
  8357. operand.   Similarly,  a generic function instantiation whose designator is
  8358. an operator symbol is only allowed if  the  specification  of  the  generic
  8359. function  has  the corresponding number of parameters.  Default expressions
  8360. are not allowed for the parameters of an operator (whether the operator  is
  8361. declared  with  an  explicit  subprogram  specification  or  by  a  generic
  8362. instantiation).
  8363. For each of the operators "+" and "-", \voverloading\v610. is  allowed  both  as  a
  8364. unary and as a binary operator.
  8365. The explicit \vdeclaration of a function\v601. that overloads the \vequality operator\v411.
  8366. "=",  other  than  by  a  renaming  declaration,  is  only  allowed if both
  8367. parameters are of the same \vlimited type\v708..  An overloading of  equality  must
  8368. deliver  a  result  of  the  \vpredefined  type  BOOLEAN\v313.;  it also implicitly
  8369. overloads the \vinequality  operator\v413.  "/="  so  that  this  still  gives  the
  8370. \vcomplementary result\v413. to the equality operator.  Explicit overloading of the
  8371. inequality operator is not allowed.
  8372. A  renaming  declaration  whose designator is the equality operator is only
  8373. allowed to rename another equality operator.  (For example, such a renaming
  8374. declaration can be used when equality  is  \vvisible  by  selection\v803.  but  not
  8375. \vdirectly visible\v803..)
  8376. Note:
  8377. Overloading  of relational operators does not affect basic comparisons such
  8378. as testing for membership in a range or the choices in a case statement.
  8379. \uExamples:\n
  8380.     \ufunction\n "+" (LEFT, RIGHT : MATRIX) \ureturn\n MATRIX;
  8381.     \ufunction\n "+" (LEFT, RIGHT : VECTOR) \ureturn\n VECTOR;
  8382.     --  assuming that A, B, and C are of the type VECTOR
  8383.     --  the three following assignments are equivalent
  8384.     A := B + C;
  8385.     A := "+"(B, C);
  8386.     A := "+"(LEFT => B, RIGHT => C);
  8387. 7. \uPackages\n
  8388. Packages  are  one of the four forms of \vprogram unit\v600., of which programs can
  8389. be composed.  The other forms are  \vsubprograms\v600.,  \vtask  units\v900.,  and  \vgeneric\v1200.
  8390. \vunits\v1200..
  8391. Packages  allow  the specification of groups of logically related entities.
  8392. In their simplest form packages specify pools of  common  object  and  \vtype\v306.
  8393. \vdeclarations\v306..   More  generally,  packages can be used to specify groups of
  8394. related entities including also subprograms that can be called from outside
  8395. the package, while their inner workings remain concealed and protected from
  8396. outside users.
  8397. More details:
  8398.  7.1    \vPackage Structure\v701.
  8399.  7.2    \vPackage Specifications and Declarations\v702.
  8400.  7.3    \vPackage Bodies\v703.
  8401.  7.4    \vPrivate Type and Deferred Constant Declarations\v704.
  8402.  7.5    \vExample of a Table Management Package\v709.
  8403.  7.6    \vExample of a Text Handling Package\v710.
  8404. 7.1  \uPackage Structure\n
  8405. A  package is generally provided in two parts:  a package specification and
  8406. a \vpackage body\v703..  Every package has a package  specification,  but  not  all
  8407. packages have a package body.
  8408.     package_declaration ::= package_specification;
  8409.     package_specification ::=
  8410.         \upackage\n identifier \uis\n
  8411.           {\vbasic_declarative_item\v333.}
  8412.        [\uprivate\n
  8413.           {basic_declarative_item}]
  8414.         \uend\n [package_simple_name]
  8415.     package_body ::=
  8416.         \upackage body\n package_simple_name \uis\n
  8417.            [declarative_part]
  8418.        [\ubegin\n
  8419.             \vsequence_of_statements\v501.
  8420.        [\uexception\n
  8421.             exception_handler
  8422.            {\vexception_handler\v1102.}]]
  8423.         \uend\n [package_simple_name];
  8424. The  simple  name  at  the  start of a package body must repeat the package
  8425. \videntifier\v203..  Similarly if a \vsimple name\v401. appears at the end of  the  package
  8426. specification or body, it must repeat the package identifier.
  8427. If  a \vsubprogram declaration\v601., a package declaration, a \vtask declaration\v901., or
  8428. a  \vgeneric  declaration\v1201.  is  a  \vdeclarative  item\v333.  of   a   given   package
  8429. specification, then the body (if there is one) of the \vprogram unit\v600. declared
  8430. by  the  declarative  item  must  itself  be  a  declarative  item  of  the
  8431. \vdeclarative part\v333. of the body of the given package.
  8432. \uNotes:\n
  8433. A simple form of package, specifying a pool of \vobjects\v302. and \vtypes\v305., does  not
  8434. require  a  package  body.   One  of  the  possible uses of the sequence of
  8435. statements of a package body is  to  initialize  such  objects.   For  each
  8436. subprogram  declaration   there  must be a corresponding body (except for a
  8437. subprogram written in another language, as explained in section 13.9).   If
  8438. the  body  of  a  program  unit  is a \vbody stub\v1004., then a separately compiled
  8439. \vsubunit\v1004. containing the  corresponding  \vproper  body\v333.  is  required  for  the
  8440. program  unit  (see  10.2).   A body is not a basic declarative item and so
  8441. cannot appear in a package specification.
  8442. A package  declaration  is  either  a  library  package  (see  10.2)  or  a
  8443. declarative item declared within another program unit.
  8444. 7.2  \uPackage Specifications and Declarations\n
  8445. The first list of \vdeclarative items\v333.  of  a \vpackage specification\v701. is  called
  8446. the  visible  part  of the \vpackage\v700..  The optional list of declarative items
  8447. after the reserved word private is called the private part of the  package.
  8448. An  entity declared in the private part of a package is not visible outside
  8449. the package itself  (a \vname\v401. denoting such an entity is only possible within
  8450. the package).  In contrast, \vexpanded names\v404. denoting  entities  declared  in
  8451. the visible part can be used even outside the package;  furthermore, \vdirect\v803.
  8452. \vvisibility\v803. of  such  entities can be achieved by means of \vuse clauses\v804. (see
  8453. 4.1.3 and 8.4).
  8454. The \velaboration\v333. of a \vpackage declaration\v701. consists of the elaboration of its
  8455. \vbasic declarative items\v333. in the given order.
  8456. \uNotes:\n
  8457. The visible part of a package contains all  the  information  that  another
  8458. program  unit  is  able to know about the package.  A package consisting of
  8459. only a package specification (that is, without a package body) can be  used
  8460. to  represent a group of common \vconstants\v303. or \vvariables\v303., or a common pool of
  8461. objects and types, as in the examples below.
  8462. Example of a package describing a group of common variables:
  8463.     \upackage\n PLOTTING_DATA \uis\n
  8464.        PEN_UP : BOOLEAN;
  8465.        CONVERSION_FACTOR,
  8466.        X_OFFSET, Y_OFFSET,
  8467.        X_MIN,    Y_MIN,
  8468.        X_MAX,    Y_MAX:   REAL;     --  see 3.5.7
  8469.        X_VALUE : \uarray\n (1 .. 500) \uof\n REAL;
  8470.        Y_VALUE : \uarray\n (1 .. 500) \uof\n REAL;
  8471.     \uend\n PLOTTING_DATA;
  8472. Example of a package describing a common pool of objects and types:
  8473.     \upackage\n WORK_DATA \uis\n
  8474.        \utype\n DAY \uis\n (MON, TUE, WED, THU, FRI, SAT, SUN);
  8475.        \utype\n HOURS_SPENT \uis delta\n 0.25 \urange\n 0.0 .. 24.0;
  8476.        \utype\n TIME_TABLE  \uis array\n (DAY) \uof\n HOURS_SPENT;
  8477.        WORK_HOURS   : TIME_TABLE;
  8478.        NORMAL_HOURS : \uconstant\n TIME_TABLE :=
  8479.                          (MON .. THU => 8.25, FRI => 7.0, SAT | SUN => 0.0);
  8480.     \uend\n WORK_DATA;
  8481. 7.3  \uPackage Bodies\n
  8482. In contrast to the entities declared in  the  \vvisible  part\v702.  of  a  \vpackage\v701.
  8483. \vspecification\v701.,  the  entities declared in the package body are only visible
  8484. within the package body itself.  As a consequence, a package with a package
  8485. body can be used for the construction of a group of related \vsubprograms\v600.  (a
  8486. package  in  the usual sense), in which the logical operations available to
  8487. the users are clearly isolated from the internal entities.
  8488. For the \velaboration\v301. of a  package  body,  its  \vdeclarative  part\v333.  is  first
  8489. elaborated,  and its \vsequence of statements\v501. (if any) is then executed.  The
  8490. optional  \vexception  handlers\v1102.  at  the  end  of  a  package  body   service
  8491. exceptions raised during the execution of the sequence of statements of the
  8492. package body.
  8493. \uNotes:\n
  8494. A  \vvariable\v303.  declared  in the body of a package is only visible within this
  8495. body and, consequently, its value can only be changed  within  the  package
  8496. body.   In the absence of local tasks, the value of such a variable remains
  8497. unchanged between calls issued from  outside  the  package  to  subprograms
  8498. declared  in  the  visible  part.   The  properties  of such a variable are
  8499. similar to those of an "own" variable of Algol 60.
  8500. The elaboration of the body of a subprogram declared in the visible part of
  8501. a package is caused by the elaboration of the body of the package.  Hence a
  8502. call of such a subprogram by an outside \vprogram unit\v600. raises  the  \vexception\v1100.
  8503. \vPROGRAM_ERROR\v1101. if the call takes place before the elaboration of the package
  8504. body (see 3.9).
  8505. Example of a package:
  8506.     \upackage\n RATIONAL_NUMBERS \uis\n
  8507.        \utype\n RATIONAL \uis\n
  8508.           \urecord\n
  8509.              NUMERATOR   : INTEGER;
  8510.              DENOMINATOR : POSITIVE;
  8511.           \uend record\n;
  8512.        \ufunction\n EQUAL(X,Y : RATIONAL) \ureturn\n BOOLEAN;
  8513.        \ufunction\n "/"  (X,Y : INTEGER)  \ureturn\n RATIONAL;  --  to construct a
  8514.                                                              rational number
  8515.        \ufunction\n "+"  (X,Y : RATIONAL) \ureturn\n RATIONAL;
  8516.        \ufunction\n "-"  (X,Y : RATIONAL) \ureturn\n RATIONAL;
  8517.        \ufunction\n "*"  (X,Y : RATIONAL) \ureturn\n RATIONAL;
  8518.        \ufunction\n "/"  (X,Y : RATIONAL) \ureturn\n RATIONAL;
  8519.     \uend\n;
  8520.     \upackage body\n RATIONAL_NUMBERS \uis\n
  8521.        \uprocedure\n SAME_DENOMINATOR (X,Y : \uin out\n RATIONAL) \uis\n
  8522.        \ubegin\n
  8523.           --  reduces X and Y to the same denominator:
  8524.           ...
  8525.        \uend\n;
  8526.        \ufunction\n EQUAL(X,Y : RATIONAL) \ureturn\n BOOLEAN \uis\n
  8527.           U,V : RATIONAL;
  8528.        \ubegin\n
  8529.           U := X;
  8530.           V := Y;
  8531.           SAME_DENOMINATOR (U,V);
  8532.           \ureturn\n U.NUMERATOR = V.NUMERATOR;
  8533.        \uend\n EQUAL;
  8534.        \ufunction\n "/" (X,Y : INTEGER) \ureturn\n RATIONAL \uis\n
  8535.        \ubegin\n
  8536.           \uif\n Y > 0 \uthen\n
  8537.              \ureturn\n (NUMERATOR => X,  DENOMINATOR => Y);
  8538.           \uelse\n
  8539.              \ureturn\n (NUMERATOR => -X, DENOMINATOR => -Y);
  8540.           \uend if\n;
  8541.        \uend\n "/";
  8542.        \ufunction\n "+" (X,Y : RATIONAL) \ureturn\n RATIONAL \uis\n ...  \uend\n "+";
  8543.        \ufunction\n "-" (X,Y : RATIONAL) \ureturn\n RATIONAL \uis\n ...  \uend\n "-";
  8544.        \ufunction\n "*" (X,Y : RATIONAL) \ureturn\n RATIONAL \uis\n ...  \uend\n "*";
  8545.        \ufunction\n "/" (X,Y : RATIONAL) \ureturn\n RATIONAL \uis\n ...  \uend\n "/";
  8546.     \uend\n RATIONAL_NUMBERS;
  8547. 7.4  \uPrivate Type and Deferred Constant Declarations\n
  8548. The declaration of a \vtype\v305. as a \vprivate  type\v705.  in  the  visible  part  of  a
  8549. \vpackage\v700. serves to separate the characteristics that can be used directly by
  8550. outside  \vprogram  units\v600.  (that  is,  the  logical  properties)  from  other
  8551. characteristics whose direct use is confined to the package (the details of
  8552. the definition of the type itself).  \vDeferred constant\v707. \vdeclarations\v301. declare
  8553. \vconstants\v303. of private types.
  8554.     private_type_declaration ::=
  8555.        \utype\n identifier [\vdiscriminant_part\v326.] \uis\n [limited] \uprivate\n;
  8556.     deferred_constant_declaration ::=
  8557.        identifier_list : \uconstant\n \vtype_mark\v307.;
  8558. A private type declaration is only  allowed as a \vdeclarative  item\v333.  of  the
  8559. \vvisible  part\v702.  of  a package, or as the \vgeneric parameter declaration\v1201. for a
  8560. \vgeneric formal type\v1201. in a \vgeneric formal part\v1201.
  8561. The type mark of a deferred constant declaration must denote a private type
  8562. or a \vsubtype\v305. of a private type;  a deferred constant  declaration  and  the
  8563. declaration  of  the  corresponding  private  type must both be declarative
  8564. items of the visible  part  of  the  same  package.   A  deferred  constant
  8565. declaration  with several \videntifiers\v203. is equivalent to a sequence of single
  8566. deferred constant declarations as explained in section 3.2.
  8567. Examples of private type declarations:
  8568.     \utype\n KEY \uis private\n;
  8569.     \utype\n FILE_NAME \uis limited private\n;
  8570. Example of deferred constant declaration:
  8571.     NULL_KEY : \uconstant\n KEY;
  8572. More details:
  8573.  7.4.1  \vPrivate Types\v705.
  8574.  7.4.2  \vOperations of a Private Type\v706.
  8575.  7.4.3  \vDeferred Constants\v707.
  8576.  7.4.4  \vLimited Types\v708.
  8577. 7.4.1  \uPrivate Types\n
  8578. If  a  private  \vtype declaration\v306. is given in the \vvisible part\v702. of a \vpackage\v700.,
  8579. then a corresponding declaration of a \vtype\v305. with the  same  \videntifier\v203.  must
  8580. appear  as  a  \vdeclarative  item\v333.  of  the \vprivate part\v702. of the package.  The
  8581. corresponding declaration must be either a full  type  declaration  or  the
  8582. declaration  of  a task type.  In the rest of this section explanations are
  8583. given in terms of \vfull type declarations\v306.;  the same  rules  apply  also  to
  8584. declarations of task types.
  8585. A  private  type  declaration  and  the corresponding full type declaration
  8586. define a single type.  The private  type  declaration,  together  with  the
  8587. visible  part,  define the \voperations\v305. that are available to outside program
  8588. units (see section 7.4.2 on the operations that are available  for  private
  8589. types).   On  the  other  hand,  the  full  type  declaration defines other
  8590. operations whose direct use is only possible within the package itself.
  8591. If the \vprivate type\v704. declaration includes  a  \vdiscriminant  part\v326.,  the  full
  8592. declaration  must  include a discriminant part that \vconforms\v604. (see 6.3.1 for
  8593. the conformance rules) and its  \vtype  definition\v306.  must  be  a  \vrecord  type\v325.
  8594. \vdefinition\325..  Conversely, if the \vprivate type declaration\v704. does not include a
  8595. discriminant part, the type declared by the full type declaration (the full
  8596. type)  must not be an unconstrained type with discriminants.  The full type
  8597. must not be an unconstrained \varray type\v321..  A \vlimited type\v708. (in  particular  a
  8598. task  type)  is allowed for the full type only if the \vreserved word\v211. limited
  8599. appears in the private type declaration (see 7.4.4).
  8600. Within the \vspecification of the package\v701. that declares a  private  type  and
  8601. before  the  end  of the corresponding full type declaration, a restriction
  8602. applies to the use of a \vname\v401. that denotes the private type or a \vsubtype\v305.  of
  8603. the  private type and, likewise, to the use of a name that denotes any type
  8604. or subtype that has a \vsubcomponent\v305. of the private type.  The  only  allowed
  8605. occurrences  of  such a name are in a \vdeferred constant declaration\v707., a type
  8606. or  \vsubtype  declaration\v307.,  a  \vsubprogram   specification\v601.,   or   an   \ventry\v905.
  8607. \vdeclaration\v905.;   moreover,  occurrences  within  \vderived  type definitions\v309. or
  8608. within simple \vexpressions\v410. are not allowed.
  8609. The \velaboration\v333. of a private type declaration creates a private  type.   If
  8610. the  private  type  declaration  has  a discriminant part, this elaboration
  8611. includes that of the discriminant part.  The elaboration of the  full  type
  8612. declaration  consists  of  the  elaboration  of  the  type definition;  the
  8613. discriminant  part,  if  any,  is  not  elaborated  (since  the  conforming
  8614. discriminant  part  of  the  private  type  declaration  has  already  been
  8615. elaborated).
  8616. \uNotes:\n
  8617. It follows from the given rules that neither the declaration of a  \vvariable\v303.
  8618. of  a  private  type,  nor the creation by an \vallocator\v421. of an object of the
  8619. private  type  are  allowed  before  the  full  declaration  of  the  type.
  8620. Similarly  before the full declaration, the name of the private type cannot
  8621. be used in a \vgeneric instantiation\v1206. or in a \vrepresentation clause\v1301..
  8622. 7.4.2  \uOperations of a Private Type\n
  8623. The operations that are \vimplicitly declared\v301. by a private  type  \vdeclaration\v301.
  8624. include  basic operations.  These are the operations involved in \vassignment\v502.
  8625. (unless the reserved word limited appears in the  declaration),  \vmembership\v411.
  8626. \vtests\v411.,   selected   \vcomponents\v305.  for  the  selection  of  any  \vdiscriminant\v305.,
  8627. \vqualification\v420., and explicit \vconversions\v419..
  8628. For a \vprivate type\v704. T, the basic  \voperations\v305.  also  include  the  \vattributes\v405.
  8629. T'BASE  (see  3.3.3) and T'SIZE (see 13.7.2).  For an object A of a private
  8630. type, the \vbasic operations\v308.  include  the  attribute  A'CONSTRAINED  if  the
  8631. private type has discriminants (see 3.7.4), and in any case, the attributes
  8632. A'SIZE and A'ADDRESS (see 13.7.2).
  8633. Finally,  the  operations implicitly declared by a \vprivate type declaration\v704.
  8634. include the predefined comparison for \vequality\v413. and  inequality  unless  the
  8635. reserved word limited appears in the private type declaration.
  8636. The  above  operations,  together with \vsubprograms\v600. that have a parameter or
  8637. result of the private type and that are declared in the \vvisible\v702. part of the
  8638. \vpackage\v700., are the only  operations  from  the  package  that  are  available
  8639. outside the package for the private type.
  8640. Within   the  package  that  declares  the  private  type,  the  additional
  8641. operations implicitly declared  by  the  full  type  declaration  are  also
  8642. available.    However,   the  redefinition  of  these  implicitly  declared
  8643. operations is allowed within the same \vdeclarative region\v801., including between
  8644. the private type declaration and the corresponding  full  declaration.   An
  8645. explicitly  declared subprogram hides an implicitly declared operation that
  8646. has the same parameter and result type profile (this is  only  possible  if
  8647. the  implicitly  declared operation is a \vderived subprogram\v309. or a \vpredefined\v411.
  8648. \voperator\v411.).
  8649. If a composite type has subcomponents of a private  type  and  is  declared
  8650. outside  the  package  that  declares the private type, then the operations
  8651. that are implicitly declared by  the  declaration  of  the  composite  type
  8652. include  all operations that only depend on the characteristics that result
  8653. from the private type declaration alone.  (For example the  operator  <  is
  8654. not included for a one-dimensional array type.)
  8655. If  the  composite type is itself declared within the package that declares
  8656. the private type (including within an inner package  or  generic  package),
  8657. then  additional  operations that depend on the characteristics of the full
  8658. type are implicitly declared, as required by the rules  applicable  to  the
  8659. composite   type   (for   example   the   operator  <  is  declared  for  a
  8660. one-dimensional array type if the \vfull type\v705. is discrete).  These additional
  8661. operations are  implicitly  declared  at  the  earliest  place  within  the
  8662. \vimmediate  scope\v802. of the composite type and after the \vfull type declaration\v306..
  8663. The same rules apply to the operations that are implicitly declared for  an
  8664. access  type  whose designated type is a private type or a type declared by
  8665. an \vincomplete type declaration\v331..
  8666. For every private type or subtype T the following attribute is defined:
  8667. T'CONSTRAINED Yields  the  value  FALSE  if  T  denotes  an   unconstrained
  8668.               nonformal  private  type with discriminants;  also yields the
  8669.               value FALSE if T denotes a generic formal private  type,  and
  8670.               the associated actual subtype is either an unconstrained type
  8671.               with  discriminants  or  an unconstrained array type;  yields
  8672.               the value TRUE otherwise.  The value of this attribute is  of
  8673.               the predefined type BOOLEAN.
  8674. Note:
  8675. A  private  type  declaration  and  the corresponding full type declaration
  8676. define two different views of one  and  the  same  type.   Outside  of  the
  8677. defining  package  the characteristics of the type are those defined by the
  8678. visible part.  Within these outside  program  units  the  type  is  just  a
  8679. private  type  and  any language rule that applies only to another class of
  8680. types does not apply.  The fact that the full declaration  might  implement
  8681. the  private  type  with  a  type of a particular class (for example, as an
  8682. array type) is only relevant within the package itself.
  8683. The  consequences  of  this  actual  implementation  are,  however,   valid
  8684. everywhere.   For  example:  any default initialization of components takes
  8685. place;  the attribute SIZE provides  the  size  of  the  full  type;   \vtask\v904.
  8686. \vdependence\v904. rules still apply to components that are task objects.
  8687. Example:
  8688.     \upackage\n KEY_MANAGER \uis\n
  8689.        \utype\n KEY \uis private\n;
  8690.        NULL_KEY : constant KEY;
  8691.        \uprocedure\n GET_KEY(K : \uout\n KEY);
  8692.        \ufunction\n "<" (X, Y : KEY) \ureturn\n BOOLEAN;
  8693.     \uprivate\n
  8694.        \utype\n KEY \uis new\n NATURAL;
  8695.        NULL_KEY : \uconstant\n KEY := 0;
  8696.     \uend\n;
  8697.     \upackage body\n KEY_MANAGER \uis\n
  8698.        LAST_KEY : KEY := 0;
  8699.        \uprocedure\n GET_KEY(K : out KEY) \uis\n
  8700.        \ubegin\n
  8701.           LAST_KEY := LAST_KEY + 1;
  8702.           K := LAST_KEY;
  8703.        \uend\n GET_KEY;
  8704.        \ufunction\n "<" (X, Y : KEY) \ureturn\n BOOLEAN \uis\n
  8705.        \ubegin\n
  8706.           \ureturn\n INTEGER(X) < INTEGER(Y);
  8707.        \uend\n "<";
  8708.     \uend\n KEY_MANAGER;
  8709. Notes on the example:
  8710. Outside of the package KEY_MANAGER, the operations available for objects of
  8711. type KEY include assignment, the comparison for equality or inequality, the
  8712. procedure  GET_KEY  and  the  operator  "<";   they  do  not  include other
  8713. \vrelational operators\v411. such as ">=", or arithmetic operators.
  8714. The explicitly declared operator "<"  hides  the  predefined  operator  "<"
  8715. implicitly  declared  by the full type declaration.  Within the body of the
  8716. function, an explicit conversion  of  X  and  Y  to  the  type  INTEGER  is
  8717. necessary  to  invoke  the  "<"  operator of this type.  Alternatively, the
  8718. result of the function could be written as not (X >= Y), since the operator
  8719. ">=" is not redefined.
  8720. The value of the variable LAST_KEY, declared in the package  body,  remains
  8721. unchanged  between  calls of the procedure GET_KEY.  (See also the Notes of
  8722. section 7.3.)
  8723. 7.4.3  \uDeferred Constants\n
  8724. If  a  deferred  constant  declaration  is  given  in the \vvisible part\v702. of a
  8725. \vpackage\v700. then  a  constant  declaration  (that  is,  an  object  declaration
  8726. declaring a constant object, with an explicit initialization) with the same
  8727. \videntifier\v203.  must  appear  as  a \vdeclarative item\v333. of the \vprivate part\v702. of the
  8728. package.   This \vobject declaration\v303. is called the full  declaration  of  the
  8729. deferred  constant.   The  \vtype  mark\v307.  given  in  the full declaration must
  8730. \vconform\v604. to that given in the deferred  \vconstant  declaration\v604.  (see  6.3.1).
  8731. Multiple  or  single declarations are allowed for the deferred and the full
  8732. declarations, provided that the equivalent single declarations conform.
  8733. Within the \vspecification of the package\v701. that declares a  deferred  constant
  8734. and before the end of the corresponding full declaration, the use of a name
  8735. that  denotes  the  \vdeferred  constant\v704.  is  only  allowed  in  the  default
  8736. expression for a \vrecord component\v325. or for a  \vformal  parameter\v601.  (not  for  a
  8737. \vgeneric formal parameter\v1201.).
  8738. The \velaboration of a deferred constant declaration has no other effect\v301..
  8739. The  execution of a program is erroneous if it attempts to use the value of
  8740. a deferred constant  before  the  elaboration  of  the  corresponding  full
  8741. declaration.
  8742. Note:
  8743. The  full declaration for a deferred constant that has a given private type
  8744. must not appear before the corresponding full type declaration.  This is  a
  8745. consequence of the rules defining the allowed uses of a name that denotes a
  8746. private type (see 7.4.1).
  8747. 7.4.4  \uLimited Types\n
  8748. A limited type is a type for which neither \vassignment\v502.  nor  the  predefined
  8749. comparison for \vequality\v413. and inequality is \vimplicitly declared\v301..
  8750. A \vprivate type declaration\704. that includes the reserved word limited declares
  8751. a  limited  type.   A  \vtask  type\v901. is a limited \vtype\v305..  A \vtype derived\v309. from a
  8752. limited type is itself a  limited  type.   Finally,  a  \vcomposite  type\v305.  is
  8753. limited if the type of any of its \vsubcomponents\v305. is limited.
  8754. The \voperations\v305. available for a private type that is limited are as given in
  8755. section 7.4.2 for private types except for the absence of assignment and of
  8756. a predefined comparison for equality and inequality.
  8757. For  a  \vformal parameter\v601. whose type is limited and whose declaration occurs
  8758. in an explicit \vsubprogram\v600. declaration, the \vmode\v1202. out is only allowed if this
  8759. type is private and the subprogram declaration occurs  within  the  visible
  8760. part  of  the  \vpackage\v700.  that declares the private type.  The same holds for
  8761. formal  parameters  of  entry  declarations  and   of   generic   procedure
  8762. declarations.   The corresponding \vfull type\v705. must not be limited if the mode
  8763. out is used for any such formal parameter.   Otherwise,  the  corresponding
  8764. full  type  is  allowed  (but  not  required)  to  be  a  limited  type (in
  8765. particular,  it  is  allowed  to  be  a  task  type).   If  the  full  type
  8766. corresponding  to  a  limited  private  type  is  not  itself limited, then
  8767. assignment for the type is available within the package, but  not  outside.
  8768. The following are consequences of the rules for limited types:
  8769.   -  An explicit initialization is not allowed in an \vobject declaration\v302.  if
  8770.      the type of the object is limited.
  8771.   -  A default expression is not allowed in a \vcomponent declaration\v325. if  the
  8772.      type of the \vrecord component\v325. is limited.
  8773.   -  An explicit \vinitial value\v303. is  not  allowed  in  an  \vallocator\v421.  if  the
  8774.      \vdesignated\v330. type is limited.
  8775.   -  A \vgeneric formal parameter\v1201. of mode in must not be of a  limited  type.
  8776. \uNotes:\n
  8777. The above rules do not exclude  a default expression for a formal parameter
  8778. of  a  limited  type;  they do not exclude a \vdeferred constant\v707. of a limited
  8779. type if the full type is  not  limited.   An  explicit  declaration  of  an
  8780. equality operator is allowed for a limited type (see 6.7).
  8781. \vAggregates\v407.  are  not  available for a limited composite type (see 3.6.2 and
  8782. 3.7.4).  \vCatenation\v411. is not available for a limited array type (see  3.6.2).
  8783. Example:
  8784.     \upackage\n I_O_\UPACKAGE\N is
  8785.        \utype\n FILE_NAME \uis limited private\n;
  8786.        \uprocedure\n OPEN (F : \uin out\n FILE_NAME);
  8787.        \uprocedure\n CLOSE(F : \uin out\n FILE_NAME);
  8788.        \uprocedure\n READ (F : \uin\n FILE_NAME; ITEM : \uout\n INTEGER);
  8789.        \uprocedure\n WRITE(F : \uin\n FILE_NAME; ITEM : \uin\n  INTEGER);
  8790.     \uprivate\n
  8791.        \utype\n FILE_NAME \uis\n
  8792.           \urecord\n
  8793.              INTERNAL_NAME : INTEGER := 0;
  8794.           \uend record\n;
  8795.     \uend\n I_O_\UPACKAGE\N;
  8796.     \upackage body\n I_O_\UPACKAGE\N \uis\n
  8797.        LIMIT : \uconstant\n := 200;
  8798.        \utype\n FILE_DESCRIPTOR \uis record\n  ...  \uend record\n;
  8799.        DIRECTORY : \uarray\n (1 .. LIMIT) \uof\n FILE_DESCRIPTOR;
  8800.        ...
  8801.        \uprocedure\n OPEN (F : \uin out\n FILE_NAME) \uis\n  ...  \uend\n;
  8802.        \uprocedure\n CLOSE(F : \uin out\n FILE_NAME) \uis\n  ...  \uend\n;
  8803.        \uprocedure\n READ (F : \uin\n FILE_NAME; ITEM : \uout\n INTEGER) \uis\n ... \uend\n;
  8804.        \uprocedure\n WRITE(F : \uin\n FILE_NAME; ITEM : \uin\n  INTEGER) \uis\n ... \uend\n;
  8805.     \ubegin\n
  8806.        ...
  8807.     \uend\n I_O_PACKAGE;
  8808. Notes on the example:
  8809. In  the  example above, an outside subprogram making use of I_O_PACKAGE may
  8810. obtain a file name by calling OPEN and later use it in calls  to  READ  and
  8811. WRITE.  Thus, outside the package, a file name obtained from OPEN acts as a
  8812. kind  of  password;   its internal properties (such as containing a numeric
  8813. value) are  not  known  and  no  other  operations  (such  as  addition  or
  8814. comparison of internal names) can be performed on a file name.
  8815. This  example is characteristic of any case where complete control over the
  8816. operations of a type is desired.  Such packages serve a dual purpose.  They
  8817. prevent a user from making use of the internal structure of the type.  They
  8818. also implement the notion of an  encapsulated  data  type  where  the  only
  8819. operations on the type are those given in the package specification.
  8820. 7.5  \uExample of a Table Management Package\n
  8821. The  following  example  illustrates  the use of packages in providing high
  8822. level procedures with a simple interface to the user.
  8823. The problem is to define a  table  management  package  for  inserting  and
  8824. retrieving  items.   The  items  are  inserted  into  the table as they are
  8825. supplied.  Each inserted item has an order number.  The items are retrieved
  8826. according to their order number, where  the  item  with  the  lowest  order
  8827. number is retrieved first.
  8828. From  the  user's  point  of view, the package is quite simple.  There is a
  8829. type called ITEM designating table items, a procedure INSERT for  inserting
  8830. items,  and  a  procedure  RETRIEVE  for obtaining the item with the lowest
  8831. order number.  There is a special item NULL_ITEM that is returned when  the
  8832. table  is  empty,  and an exception TABLE_FULL which is raised by INSERT if
  8833. the table is already full.
  8834. A sketch of such a package is given below.  Only the specification  of  the
  8835. package is exposed to the user.
  8836.     \upackage\n TABLE_MANAGER \uis\n
  8837.        \utype\n ITEM \uis\n
  8838.           \urecord\n
  8839.              ORDER_NUM : INTEGER;
  8840.              ITEM_CODE : INTEGER;
  8841.              QUANTITY  : INTEGER;
  8842.              ITEM_TYPE : CHARACTER;
  8843.           \uend record\n;
  8844.        NULL_ITEM : \uconstant\n ITEM :=
  8845.           (ORDER_NUM | ITEM_CODE | QUANTITY => 0, ITEM_TYPE => ' ');
  8846.        \uprocedure\n INSERT  (NEW_ITEM   : \uin\n  ITEM);
  8847.        \uprocedure\n RETRIEVE(FIRST_ITEM : \uout\n ITEM);
  8848.        TABLE_FULL : \uexception\n;  --  raised by INSERT when table full
  8849.     \uend\n;
  8850. The  details  of  implementing such packages can be quite complex;  in this
  8851. case they involve a two-way  linked  table  of  internal  items.   A  local
  8852. housekeeping  procedure  EXCHANGE  is used to move an internal item between
  8853. the busy and the free lists.  The initial table linkages are established by
  8854. the initialization part.  The package body need not be shown to  the  users
  8855. of the package.
  8856.     \upackage body\n TABLE_MANAGER \uis\n
  8857.        SIZE : \uconstant\n := 2000;
  8858.        \usubtype\n INDEX \uis\n INTEGER \urange\n 0 .. SIZE;
  8859.        \utype\n INTERNAL_ITEM \uis\n
  8860.           \urecord\n
  8861.              CONTENT : ITEM;
  8862.              SUCC    : INDEX;
  8863.              PRED    : INDEX;
  8864.           \uend record\n;
  8865.        TABLE : \uarray\n (INDEX) \uof\n INTERNAL_ITEM;
  8866.        FIRST_BUSY_ITEM : INDEX := 0;
  8867.        FIRST_FREE_ITEM : INDEX := 1;
  8868.        \ufunction\n FREE_LIST_EMPTY \ureturn\n BOOLEAN \uis\n ... \uend\n;
  8869.        \ufunction\n BUSY_LIST_EMPTY \ureturn\n BOOLEAN \uis\n ... \uend\n;
  8870.        \uprocedure\n EXCHANGE (FROM : \uin\n INDEX; TO : \uin\n INDEX) \uis\n ... \uend\n;
  8871.        \uprocedure\n INSERT (NEW_ITEM : \uin\n ITEM) \uis\n
  8872.        \ubegin\n
  8873.           \uif\n FREE_LIST_EMPTY \uthen\n
  8874.              \uraise\n TABLE_FULL;
  8875.           \uend if\n;
  8876.           --  remaining code for INSERT
  8877.        \uend\n INSERT;
  8878.        \uprocedure\n RETRIEVE (FIRST_ITEM : \uout\n ITEM) \uis\n ... \uend\n;
  8879.     \ubegin\n
  8880.        --  initialization of the table linkages
  8881.     \uend\n TABLE_MANAGER;
  8882. 7.6  \uExample of a Text Handling Package\n
  8883. This  example  illustrates  a simple text handling package.  The users only
  8884. have access to the visible part;  the implementation is hidden from them in
  8885. the private part and the package body (not shown).
  8886. From a user's point of view, a TEXT is a variable-length string.  Each text
  8887. object has a maximum length,  which  must  be  given  when  the  object  is
  8888. declared,  and  a  current  value, which is a string of some length between
  8889. zero and the maximum.  The maximum possible length of a text object  is  an
  8890. implementation-defined constant.
  8891. The  package  defines first the necessary types, then functions that return
  8892. some characteristics of objects of the type, then the conversion  functions
  8893. between  texts  and  the predefined CHARACTER and STRING types, and finally
  8894. some of the standard operations on varying strings.   Most  operations  are
  8895. overloaded  on strings and characters as well as on the type TEXT, in order
  8896. to minimize the number of explicit conversions the user has to write.
  8897.     \upackage\n TEXT_HANDLER \uis\n
  8898.        MAXIMUM : \uconstant\n := SOME_VALUE;  --  implementation-defined
  8899.        \usubtype\n INDEX \uis\n INTEGER \urange\n 0 .. MAXIMUM;
  8900.        \utype\n TEXT(MAXIMUM_LENGTH : INDEX) \uis limited private\n;
  8901.        \ufunction\n LENGTH (T : TEXT) \ureturn\n INDEX;
  8902.        \ufunction\n VALUE  (T : TEXT) \ureturn\n STRING;
  8903.        \ufunction\n EMPTY  (T : TEXT) \ureturn\n BOOLEAN;
  8904.        \ufunction\n TO_TEXT (S : STRING;    MAX : INDEX) \ureturn\n TEXT;
  8905.                                                      --  maximum length MAX
  8906.        \ufunction\n TO_TEXT (C : CHARACTER; MAX : INDEX) \ureturn\n TEXT;
  8907.        \ufunction\n TO_TEXT (S : STRING)    \ureturn\n TEXT;
  8908.                                                 --  maximum length S'LENGTH
  8909.        \ufunction\n TO_TEXT (C : CHARACTER) \ureturn\n TEXT;
  8910.        \ufunction\n "&" (LEFT : TEXT;      RIGHT : TEXT)      \ureturn\n TEXT;
  8911.        \ufunction\n "&" (LEFT : TEXT;      RIGHT : STRING)    \ureturn\n TEXT;
  8912.        \ufunction\n "&" (LEFT : STRING;    RIGHT : TEXT)      \ureturn\n TEXT;
  8913.        \ufunction\n "&" (LEFT : TEXT;      RIGHT : CHARACTER) \ureturn\n TEXT;
  8914.        \ufunction\n "&" (LEFT : CHARACTER; RIGHT : TEXT)      \ureturn\n TEXT;
  8915.        \ufunction\n "="  (LEFT : TEXT; RIGHT : TEXT) \ureturn\n BOOLEAN;
  8916.        \ufunction\n "<"  (LEFT : TEXT; RIGHT : TEXT) \ureturn\n BOOLEAN;
  8917.        \ufunction\n "<=" (LEFT : TEXT; RIGHT : TEXT) \ureturn\n BOOLEAN;
  8918.        \ufunction\n ">"  (LEFT : TEXT; RIGHT : TEXT) \ureturn\n BOOLEAN;
  8919.        \ufunction\n ">=" (LEFT : TEXT; RIGHT : TEXT) \ureturn\n BOOLEAN;
  8920.        \uprocedure\n SET (OBJECT : \uin out\n TEXT; VALUE : \uin\n TEXT);
  8921.        \uprocedure\n SET (OBJECT : \uin out\n TEXT; VALUE : \uin\n STRING);
  8922.        \uprocedure\n SET (OBJECT : \uin out\n TEXT; VALUE : \uin\n CHARACTER);
  8923.        \uprocedure\n APPEND (TAIL : \uin\n TEXT;      TO : \uin out\n TEXT);
  8924.        \uprocedure\n APPEND (TAIL : \uin\n STRING;    TO : \uin out\n TEXT);
  8925.        \uprocedure\n APPEND (TAIL : \uin\n CHARACTER; TO : \uin out\n TEXT);
  8926.   \uprocedure\n AMEND (OBJECT : \uin out\n TEXT; BY : \uin\n TEXT; POSITION :
  8927.                                                                  \uin\n INDEX);
  8928.   \uprocedure\n AMEND (OBJECT : \uin out\n TEXT; BY : \uin\n STRING; POSITION :
  8929.                                                                  \uin\n INDEX);
  8930.   \uprocedure\n AMEND (OBJECT : \uin out\n TEXT; BY : \uin\n CHARACTER; POSITION :
  8931.                                                                  \uin\n INDEX);
  8932. - amend replaces part of the object by the given text, string, or character
  8933. - starting at the given position in the object
  8934.        \ufunction\n LOCATE (FRAGMENT : TEXT;      WITHIN : TEXT) \ureturn\n INDEX;
  8935.        \ufunction\n LOCATE (FRAGMENT : STRING;    WITHIN : TEXT) \ureturn\n INDEX;
  8936.        \ufunction\n LOCATE (FRAGMENT : CHARACTER; WITHIN : TEXT) \ureturn\n INDEX;
  8937.        --  all \ureturn\n 0 if the fragment is not located
  8938.     \uprivate\n
  8939.        \utype\n TEXT(MAXIMUM_LENGTH : INDEX) \uis\n
  8940.           \urecord\n
  8941.              POS   : INDEX := 0;
  8942.              VALUE : STRING(1 .. MAXIMUM_LENGTH);
  8943.           \uend record\n;
  8944.     \uend\n TEXT_HANDLER;
  8945. Example of use of the text handling package:
  8946. A program opens an output file, whose name is supplied by the string  NAME.
  8947. This string has the form
  8948.     [DEVICE :] [FILENAME [.EXTENSION]]
  8949. There  are  standard  defaults  for  device,  filename, and extension.  The
  8950. user-supplied name is passed to EXPAND_FILE_NAME as a  parameter,  and  the
  8951. result is the expanded version, with any necessary defaults added.
  8952.     \ufunction\n EXPAND_FILE_NAME (NAME : STRING) \ureturn\n STRING is
  8953.        \uuse\n TEXT_HANDLER;
  8954.        DEFAULT_DEVICE    : \uconstant\n STRING := "SY:";
  8955.        DEFAULT_FILE_NAME : \uconstant\n STRING := "RESULTS";
  8956.        DEFAULT_EXTENSION : \uconstant\n STRING := ".DAT";
  8957.        MAXIMUM_FILE_NAME_LENGTH : \uconstant\n INDEX := SOME_APPROPRIATE_VALUE;
  8958.        FILE_NAME : TEXT(MAXIMUM_FILE_NAME_LENGTH);
  8959.     \ubegin\n
  8960.        SET(FILE_NAME, NAME);
  8961.        \uif\n EMPTY(FILE_NAME) \uthen\n
  8962.           SET(FILE_NAME, DEFAULT_FILE_NAME);
  8963.        \uend if\n;
  8964.        \uif\n LOCATE(':', FILE_NAME) = 0 \uthen\n
  8965.           SET(FILE_NAME, DEFAULT_DEVICE & FILE_NAME);
  8966.        \uend if\n;
  8967.        \uif\n LOCATE('.', FILE_NAME) = 0 \uthen\n
  8968.           APPEND(DEFAULT_EXTENSION, TO => FILE_NAME);
  8969.        \uend if\n;
  8970.        \ureturn\n VALUE(FILE_NAME);
  8971.     \uend\n EXPAND_FILE_NAME;
  8972. 8. \uVisibility Rules\n
  8973. The  rules  defining the \vscope\v802. of \vdeclarations\v301. and the rules defining which
  8974. \videntifiers\v203. are visible at various points in the text of  the  program  are
  8975. described  in this chapter.  The formulation of these rules uses the notion
  8976. of a \vdeclarative region\v801..
  8977. More details:
  8978. 8.1    \vDeclarative Region\v801.
  8979. 8.2    \vScope of Declarations\v802.
  8980. 8.3    \vVisibility\v803.
  8981. 8.4    \vUse Clauses\v804.
  8982. 8.5    \vRenaming Declarations\v805.
  8983. 8.6    \vThe Package Standard\v806.
  8984. 8.7    \vThe Context of Overload Resolution\v807.
  8985. 8.1  Declarative Region
  8986. A  declarative  region  is  a  portion  of  the  program  text. A  single
  8987. declarative region is formed by the text of each of the following:
  8988. -  A subprogram \vdeclaration\v301., a \vpackage declaration\v701., a  task  declaration,
  8989. or  a  \vgeneric  declaration\v1201.,  together with the corresponding body, if
  8990. any.  If the body is a \vbody stub\v1004., the declarative region also includes
  8991. the corresponding \vsubunit\v1004..  If the program unit has subunits, they are
  8992. also included.
  8993. -  An  \ventry  declaration\v905.  together   with   the   corresponding accept
  8994. statements.
  8995. -  A \vrecord type\v325. declaration, together with a  corresponding private  or
  8996. \vincomplete  type declaration\v331. if any, and together with a corresponding
  8997. \vrecord representation clause\v1304. if any.
  8998. -  A \vrenaming declaration\v805. that includes  a  \vformal  part\v601.,  or  a \vgeneric\v1201.
  8999. \vparameter  declaration\v1201.  that  includes  either  a  formal  part or  a
  9000. \vdiscriminant part\v326..
  9001. -  A \vblock statement\v507. or a \vloop statement\v506..
  9002. In each of the above cases, the declarative region is said to be associated
  9003. with the corresponding declaration or statement.  A declaration is said  to
  9004. occur  immediately  within  a  declarative  region  if  this  region is the
  9005. innermost  region  that  encloses  the  declaration,   not counting   the
  9006. declarative region (if any) associated with the declaration itself.
  9007. A  declaration  that occurs immediately within a declarative region is said
  9008. to be local to the region.  Declarations in outer (enclosing) regions  are
  9009. said  to  be  global  to  an  inner (enclosed) declarative region.  A local
  9010. entity is one declared by a local declaration;   a  global  entity  is  one
  9011. declared by a global declaration.
  9012. Some  of  the  above  forms  of declarative region include several disjoint
  9013. parts (for example, other declarative items can be between the declaration
  9014. of  a  \vpackage\v700.  and  its  body).   Each  declarative region is nevertheless
  9015. considered as a (logically) continuous portion of the program text.   Hence
  9016. if  any  rule defines  a portion of text as the text that extends from some
  9017. specific point of a declarative region to the end of this region, then this
  9018. portion is the corresponding subset of the declarative region (for  example
  9019. it does not include intermediate declarative items between the two parts of
  9020. a package).
  9021. \uNotes:\n
  9022. As   defined   in   section   3.1,  the  term  declaration  includes  basic
  9023. declarations, \vimplicit declarations\v301., and those declarations that are  part
  9024. of   \vbasic   declarations\v301.,   for   example,   discriminant   and \vparameter\v601.
  9025. \vspecifications\v601..  It follows from the definition  of  a  declarative  region
  9026. that  a  \vdiscriminant  specification\v326.  occurs  immediately within the region
  9027. associated with  the  enclosing  record  type  declaration.   Similarly,  a
  9028. parameter  specification  occurs  immediately  within the region associated
  9029. with the enclosing \vsubprogram body\v603. or \vaccept statement\v905..
  9030. The \vpackage STANDARD\v806. forms a declarative region which encloses all  \vlibrary\v701.
  9031. \vunits\v701.:   the  implicit declaration of each library unit is assumed to occur
  9032. immediately within this package (see sections 8.6 and 10.1.1).
  9033. Declarative regions can be nested within other  declarative  regions.   For
  9034. example,  subprograms,  packages,  \vtask  units\v900.,  generic  units, and block
  9035. statements can be nested within each other, and  can  contain record  type
  9036. declarations, loop statements, and accept statements.
  9037. 8.2  \uScope of Declarations\n
  9038. For  each  form of \vdeclaration\v301., the language rules define a certain portion
  9039. of the program text called the scope of the declaration.  The  scope  of  a
  9040. declaration  is  also  called  the  scope  of  any  entity  declared by the
  9041. declaration.  Furthermore, if the declaration associates some notation with
  9042. a declared entity, this portion of the text is also  called  the  scope  of
  9043. this  notation  (either  an  \videntifier\v203.,  a  \vcharacter literal\v207., an \voperator\v601.
  9044. \vsymbol\v601., or the notation for a \vbasic operation\v308.).  Within  the  scope  of  an
  9045. entity,  and  only  there,  there  are  places where it is legal to use the
  9046. associated notation in order to refer to the declared entity.  These places
  9047. are defined by the rules of \vvisibility\v803. and \voverloading\v610..
  9048. The scope of a declaration that \voccurs  immediately  within\v801.  a  \vdeclarative\v801.
  9049. \vregion\v801.  \vextends\v801.  from  the  beginning  of the declaration to the end of the
  9050. declarative region;  this part of the scope of a declaration is called  the
  9051. immediate  scope.   Furthermore,  for any of the declarations listed below,
  9052. the scope of the declaration extends beyond the immediate scope:
  9053. (a)  A declaration that occurs immediately within the  visible  part  of  a
  9054. \vpackage declaration\v701..
  9055. (b)  An \ventry declaration\v905..
  9056. (c)  A \vcomponent declaration\v325..
  9057. (d)  A \vdiscriminant specification\v326..
  9058. (e)  A \vparameter specification\v601..
  9059. (f)  A \vgeneric parameter declaration\v1201..
  9060. In  each  of  these  cases, the given declaration occurs immediately within
  9061. some enclosing declaration, and the scope of the given declaration  extends
  9062. to the end of the scope of the enclosing declaration.
  9063. In  the  absence  of a \vsubprogram declaration\v601., the subprogram specification
  9064. given in the \vsubprogram body\v603. or in the \vbody stub\v1004. acts  as  the  declaration
  9065. and rule (e) applies also in such a case.
  9066. Note:
  9067. The  above scope rules apply to all forms of declaration defined by section
  9068. 3.1;  in particular, they apply also to \vimplicit  declarations\v301..   Rule  (a)
  9069. applies  to a package declaration and thus not to the \vpackage specification\v701.
  9070. of a \vgeneric declaration\v1201..  For nested declarations, the rules  (a)  through
  9071. (f)  apply  at  each level.  For example, if a task unit is declared in the
  9072. \vvisible part\v702. of a package, the scope of an entry of the \vtask  unit\v900.  extends
  9073. to  the end of the scope of the task unit, that is, to the end of the scope
  9074. of the enclosing package.  The scope of a \vuse clause\v804. is defined in  section
  9075. 8.3  \uVisibility\n
  9076. The meaning of the occurrence of an \videntifier\v203. at a given place in the text
  9077. is defined by the visibility rules and also,  in  the  case  of  \voverloaded\v610.
  9078. \vdeclarations\v301., by the overloading rules.  The identifiers considered in this
  9079. chapter  include  any  identifier  other than a \vreserved word\v211., an attribute
  9080. designator, a \vpragma identifier\v210., the identifier of a pragma \vargument\v210., or an
  9081. identifier given as a pragma  argument.   The  places  considered  in  this
  9082. chapter  are  those where a \vlexical element\v202. (such as an identifier) occurs.
  9083. The overloaded declarations  considered  in  this  chapter  are  those  for
  9084. \vsubprograms\v600., enumeration literals, and single entries.
  9085. For  each  identifier  and  at each place in the text, the visibility rules
  9086. determine a set of declarations (with this identifier) that define possible
  9087. meanings of an occurrence of the identifier.  A declaration is said  to  be
  9088. \vvisible\v702.  at  a  given  place  in the text when, according to the visibility
  9089. rules, the declaration defines a possible meaning of this occurrence.   Two
  9090. cases arise.
  9091. -  The visibility rules determine at most one possible meaning.  In  such
  9092. a   case   the  visibility  rules  are  sufficient  to  determine  the
  9093. declaration defining the meaning of the occurrence of the  identifier,
  9094. or  in  the  absence  of  such  a  declaration,  to determine that the
  9095. occurrence is not legal at the given point.
  9096. -  The visibility rules determine more than  one  possible  meaning.   In
  9097. such a case the occurrence of the identifier is legal at this point if
  9098. and  only  if  exactly  one  visible declaration is acceptable for the
  9099. overloading rules in the given context (see section 6.6 for the  rules
  9100. of  overloading  and  section  8.7  for  the context used for overload
  9101. resolution).
  9102. A declaration is only visible within a certain part  of  its  \vscope\v802.;   this
  9103. part   starts   at   the  end  of  the  declaration  except  in  a  \vpackage\v700.
  9104. specification, in which case it starts at the reserved word is given  after
  9105. the  identifier  of  the  package  specification.   (This  rule applies, in
  9106. particular, for \vimplicit declarations\v301..)
  9107. Visibility is either by selection or direct.  A declaration is  visible  by
  9108. selection at places that are defined as follows.
  9109. (a)  For a declaration given in the visible part of a package  declaration:
  9110. at  the  place of the \vselector\v404. after the dot of an \vexpanded name\v404. whose
  9111. prefix denotes the package.
  9112. (b)  For an \ventry declaration\v905. of a given \vtask type\v901.:  at the  place  of  the
  9113. selector  after  the  dot  of  a  \vselected  component\v404.  whose prefix is
  9114. appropriate for the task type.
  9115. (c)  For a \vcomponent declaration\v325. of a given record  \vtype  declaration\v305.:   at
  9116. the  place of the selector after the dot of a \vselected component\v404. whose
  9117. prefix is \vappropriate for the type\v401.;  also at the place of a  component
  9118. simple  name  (before  the \vcompound delimiter\v202. =>) in a named component
  9119. association of an \vaggregate\v407. of the type.
  9120. (d)  For a \vdiscriminant specification\v326. of a given \vtype declaration\v306.:  at  the
  9121. same  places  as  for a component declaration;  also at the place of a
  9122. discriminant \vsimple name\v401. (before the compound delimiter =>) in a named
  9123. discriminant association of a \vdiscriminant constraint\v327. for the type.
  9124. (e)  For a \vparameter specification\v601. of a given subprogram  specification  or
  9125. entry  declaration:   at the place of the \vformal parameter\v601. (before the
  9126. compound  delimiter  =>)  in  a  named  \vparameter  association\v606.  of   a
  9127. corresponding subprogram or \ventry call\v905..
  9128. (f)  For a \vgeneric parameter declaration\v1201. of a given \vgeneric unit\v1200.:   at  the
  9129. place  of  the \vgeneric formal parameter\v1201. (before the compound delimiter
  9130. =>)  in  a  named  \vgeneric  association\v1206.  of  a  corresponding  generic
  9131. instantiation.
  9132. Finally,  within  the  \vdeclarative region\v801. associated with a construct other
  9133. than a \vrecord type\v325. declaration, any  declaration  that  \voccurs  immediately\v801.
  9134. \vwithin\v801.  the  region  is  visible  by selection at the place of the selector
  9135. after the dot of an expanded name whose prefix denotes the construct.
  9136. Where it is not visible by selection, a visible declaration is said  to  be
  9137. directly  visible.  A declaration is directly visible within a certain part
  9138. of its \vimmediate scope\v802.;  this part extends to  the  end  of  the  immediate
  9139. scope  of  the  declaration,  but  excludes places where the declaration is
  9140. hidden  as  explained  below.   In  addition,   a   declaration   occurring
  9141. immediately  within  the  visible  part  of  a package can be made directly
  9142. visible by means of a \vuse  clause\v804.  according  to  the  rules  described  in
  9143. section  8.4.   (See also section 8.6 for the visibility of \vlibrary units\v1001..)
  9144. A declaration is said to be hidden within (part of)  an  inner  declarative
  9145. region  if  the inner region contains a homograph of this declaration;  the
  9146. outer declaration is then hidden within the immediate scope  of  the  inner
  9147. homograph.  Each of two declarations is said to be a homograph of the other
  9148. if  both  declarations  have the same identifier and overloading is allowed
  9149. for  at  most  one  of  the  two.   If  overloading  is  allowed  for  both
  9150. declarations, then each of the two is a homograph of the other if they have
  9151. the  same identifier, \voperator symbol\v601., or \vcharacter literal\v207., as well as the
  9152. same \vparameter\v602. and \vresult type profile\v805.
  9153. Within the specification of a subprogram, every declaration with  the  same
  9154. designator  as  the  subprogram is hidden;  the same holds within a \vgeneric\v1206.
  9155. \vinstantiation\v1206. that declares a subprogram, and within an  entry  declaration
  9156. or  the formal part of an \vaccept statement\v905.;  where hidden in this manner, a
  9157. declaration is visible neither by selection  nor directly.
  9158. Two declarations that occur immediately within the same declarative  region
  9159. must not be homographs, unless either or both of the following requirements
  9160. are  met:   (a)  exactly  one  of  them  is  the  implicit declaration of a
  9161. predefined operation;  (b) exactly one of them is the implicit  declaration
  9162. of  a  derived subprogram.  In such cases, a predefined operation is always
  9163. hidden by the other homograph;  a derived  subprogram  hides  a  predefined
  9164. operation,  but  is  hidden  by  any other homograph.  Where hidden in this
  9165. manner, an implicit declaration is hidden within the entire  scope  of  the
  9166. other  declaration  (regardless  of  which  declaration occurs first);  the
  9167. implicit declaration is visible neither by selection nor directly.
  9168. Whenever a declaration with a certain identifier is visible  from  a  given
  9169. point,  the identifier and the declared entity (if any) are also said to be
  9170. visible from that point.  Direct visibility and visibility by selection are
  9171. likewise defined for character literals and operator symbols.  An  \voperator\v411.
  9172. is  directly  visible if and only if the corresponding operator declaration
  9173. is directly  visible.   Finally,  the  notation  associated  with  a  \vbasic\v308.
  9174. \voperation\v308. is directly visible within the entire scope of this operation.
  9175. Example:
  9176. procedure P is
  9177. A, B : BOOLEAN;
  9178. procedure Q is
  9179. C : BOOLEAN;
  9180. B : BOOLEAN;  --  an inner homograph of B
  9181. begin
  9182. B := A;    --  means Q.B := P.A;
  9183. C := P.B;  --  means Q.C := P.B;
  9184. begin
  9185. A := B;  --  means P.A := P.B;
  9186. Note on the visibility of library units:
  9187. The  visibility of library units is determined by with clauses (see 10.1.1)
  9188. and by the fact that library units are implicitly declared in  the  package
  9189. STANDARD (see 8.6).
  9190. Note on homographs:
  9191. The  same  identifier  may  occur in different declarations and may thus be
  9192. associated  with  different  entities,  even  if  the   scopes   of   these
  9193. declarations  overlap.  Overlap of the scopes of declarations with the same
  9194. identifier can result from overloading of subprograms  and  of  enumeration
  9195. literals.   Such  overlaps  can also occur for entities declared in package
  9196. visible parts and for entries, record  components,  and  parameters,  where
  9197. there  is overlap of the scopes of the enclosing package declarations, task
  9198. declarations, record type declarations, subprogram  declarations,  renaming
  9199. declarations,  or  generic  declarations.   Finally  overlapping scopes can
  9200. result from nesting.
  9201. Note on immediate scope, hiding, and visibility:
  9202. The rules defining immediate scope, hiding, and  visibility  imply  that  a
  9203. reference  to  an  identifier within its own declaration is illegal (except
  9204. for packages and \vgeneric packages\v1201. ).  The identifier hides outer  homographs
  9205. within  its  immediate  scope, that is,  from the start of the declaration;
  9206. on the other hand, the identifier is visible only  after  the  end  of  the
  9207. declaration.    For  this  reason,  all  but  the  last  of  the  following
  9208. declarations are illegal:
  9209. K : INTEGER := K * K;              --  illegal
  9210. T : T;                             --  illegal
  9211. procedure P(X : P);                --  illegal
  9212. procedure Q(X : REAL := Q);        --  illegal, even if there is a
  9213. --  function named Q
  9214. procedure R(R : REAL);   --  an inner declaration is legal (although
  9215. --  confusing)
  9216. 8.4  \uUse Clauses\n
  9217. A  use clause achieves direct visibility of \vdeclarations\v301. that appear in the
  9218. \vvisible parts\v702. of named \vpackages\v700..
  9219. use_clause ::= use package_name {, package_name};
  9220. For each use clause, there is a certain region of text called the \vscope\v802.  of
  9221. the use clause.  This region starts immediately after the use clause.  If a
  9222. use  clause  is a \vdeclarative item\v333. of some \vdeclarative region\v801., the scope of
  9223. the clause \vextends\v801. to the end of the declarative region.  If a  use  clause
  9224. occurs  within a \vcontext clause\v1001. of a \vcompilation unit\v1001., the scope of the use
  9225. clause extends to the end of the declarative  region  associated  with  the
  9226. compilation unit.
  9227. In  order to define which declarations are made \vdirectly visible\v803. at a given
  9228. place by use clauses, consider the set of packages named by all use clauses
  9229. whose scopes enclose this place, omitting from this set any  packages  that
  9230. enclose  this  place.  A declaration that can be made directly visible by a
  9231. use clause (a potentially visible  declaration)  is  any  declaration  that
  9232. \voccurs  immediately  within\v801.  the  visible  part of a package of the set.  A
  9233. potentially visible declaration is actually made directly visible except in
  9234. the following two cases:
  9235. -  A potentially visible declaration is not made directly visible if  the
  9236. place  considered  is within the \vimmediate scope\v802. of a \vhomograph\v803. of the
  9237. declaration.
  9238. -  Potentially visible declarations that have the same \videntifier\v203. are not
  9239. made directly visible unless each of them  is  either  an  \venumeration\v311.
  9240. \vliteral  specification\v311.  or  the  declaration  of  a  subprogram  (by a
  9241. \vsubprogram   declaration\v601.,   a   renaming   declaration,   a    generic
  9242. instantiation, or an implicit declaration).
  9243. The \velaboration\v301. of a use clause has no other effect.
  9244. Note:
  9245. The  above rules guarantee that a declaration that is made directly visible
  9246. by a use clause cannot hide an otherwise directly visible declaration.  The
  9247. above rules are formulated in terms of the set of packages  named  by  use
  9248. clauses.
  9249. Consequently,  the  following  lines  of  text  all  have  the  same effect
  9250. (assuming only one package P).
  9251. use P;
  9252. use P; use P, P;
  9253. Example of conflicting names in two packages:
  9254. procedure R is
  9255. package TRAFFIC is
  9256. type COLOR is (RED, AMBER, GREEN);
  9257. end TRAFFIC;
  9258. package WATER_COLORS is
  9259. type COLOR is (WHITE, RED, YELLOW, GREEN, BLUE, BROWN, BLACK);
  9260. end WATER_COLORS;
  9261. use TRAFFIC;      -- COLOR, RED, AMBER, and GREEN are directly visible
  9262. use WATER_COLORS; --  two homographs of GREEN are directly visible
  9263. --  but COLOR is no longer directly visible
  9264. subtype LIGHT is TRAFFIC.COLOR;      --Subtypes are used to resolve
  9265. subtype SHADE is WATER_COLORS.COLOR; --the conflicting type name COLOR
  9266. SIGNAL : LIGHT;
  9267. PAINT  : SHADE;
  9268. begin
  9269. SIGNAL := GREEN;  --  that of TRAFFIC
  9270. PAINT  := GREEN;  --  that of WATER_COLORS
  9271. end R;
  9272. Example of \vname\v401. identification with a use clause:
  9273. package D is
  9274. T, U, V : BOOLEAN;
  9275. end D;
  9276. procedure P is
  9277. package E is
  9278. B, W, V : INTEGER;
  9279. end E;
  9280. procedure Q is
  9281. T, X : REAL;
  9282. use D, E;
  9283. begin
  9284. --  the name T means Q.T, not D.T
  9285. --  the name U means D.U
  9286. --  the name B means E.B
  9287. --  the name W means E.W
  9288. --  the name X means Q.X
  9289. --  the name V is illegal : either D.V or E.V must be used
  9290. end Q;
  9291. begin
  9292. end P;
  9293. 8.5  \uRenaming Declarations\n
  9294. A renaming \vdeclaration\v301. declares another \vname\v401. for an entity.
  9295. renaming_declaration ::=
  9296. identifier : type_mark   renames object_name;
  9297. | identifier : exception   renames exception_name;
  9298. | \vpackage\v700. identifier       renames package_name;
  9299. | subprogram_specification renames subprogram_or_entry_name;
  9300. The  \velaboration\v301.  of a renaming declaration evaluates the name that follows
  9301. the \vreserved word\v211. renames and thereby determines the entity denoted by this
  9302. name (the renamed entity).  At any point where a  renaming  declaration  is
  9303. visible, the identifier, or \voperator symbol\v601. of this declaration denotes the
  9304. renamed entity.
  9305. The first form of renaming declaration is used for the renaming of \vobjects\v302..
  9306. The  renamed  entity  must  be an object of the \vbase type\v305. of the \vtype mark\v305..
  9307. The properties of the renamed object  are  not  affected  by  the  renaming
  9308. declaration.   In particular, its value and whether or not it is a \vconstant\v303.
  9309. are unaffected;  similarly, the \vconstraints\v305. that apply to an object are not
  9310. affected by renaming (any constraint  implied  by  the  type  mark  of  the
  9311. renaming  declaration  is ignored).  The renaming declaration is \vlegal\v108. only
  9312. if exactly one object has this type and can be denoted by the object  name.
  9313. The  following  restrictions  apply  to the renaming of a \vsubcomponent\v305. that
  9314. \vdepends on discriminants\v326. of a \vvariable\v303..  The renaming is not allowed if the
  9315. \vsubtype\v307. of the variable, as defined in a corresponding \vobject  declaration\v302.,
  9316. component declaration, or component subtype indication, is an unconstrained
  9317. type;   or  if  the  variable  is a generic formal object (of \vmode\v601. in out).
  9318. Similarly if the variable is  a  \vformal  parameter\v601.,  the  renaming  is  not
  9319. allowed  if  the  type mark given in the \vparameter specification\v601. denotes an
  9320. nconstrained type whose \vdiscriminants\v326. have \vdefault expressions\v601..
  9321. The second form of  renaming  declaration  is  used  for  the  renaming  of
  9322. exceptions;  the third form, for the renaming of packages.
  9323. The  last  form  of  renaming  declaration  is  used  for  the  renaming of
  9324. \vsubprograms\v600.  and  entries.   The  renamed  subprogram  or  \ventry\v905.  and   the
  9325. subprogram  specification  given  in the renaming declaration must have the
  9326. same \vparameter\v602. and result type profile (see 6.6).  The renaming declaration
  9327. is legal only if exactly one visible  subprogram  or  entry  satisfies  the
  9328. above  requirements  and  can  be  denoted by the given subprogram or entry
  9329. name.  In addition, parameter modes must be identical for formal parameters
  9330. that are at the same parameter position.
  9331. The subtypes of the parameters and result (if any) of a renamed  subprogram
  9332. or  entry  are not affected by renaming.  These subtypes are those given in
  9333. the  original  \vsubprogram  declaration\v601.,  generic  instantiation,  or  entry
  9334. declaration  (not  those of the renaming declaration);  even for calls that
  9335. use the new name.  On the other hand, a renaming declaration can  introduce
  9336. parameter  names  and  default  expressions  that  differ from those of the
  9337. renamed subprogram;  named associations of calls with  the  new  subprogram
  9338. name  must  use the new parameter name;  calls with the old subprogram name
  9339. must use the old parameter names.
  9340. A \vprocedure\v601. can only be renamed as a procedure.  Either of  a  \vfunction\v609.  or
  9341. \voperator\v611.  can be renamed as either of a function or operator;  for renaming
  9342. as  an  operator,  the  \vsubprogram  specification\v601.  given  in  the  renaming
  9343. declaration  is  subject  to  the  rules  given in section 6.7 for \voperator\v611.
  9344. \vdeclarations\v611..   \vEnumeration  literals\v311.  can   be   renamed   as   functions;
  9345. similarly,  attributes  defined as functions (such as SUCC and PRED) can be
  9346. renamed as functions.  An entry can only be renamed as  a  procedure;   the
  9347. new name is only allowed to appear in contexts that \vallow\v108. a procedure name.
  9348. An \ventry of a family\v905. can be renamed, but an entry family cannot be renamed
  9349. as a whole.
  9350. \uExamples:\n
  9351. declare
  9352. L : PERSON renames LEFTMOST_PERSON; -- see 3.8.1
  9353. begin
  9354. L.AGE := L.AGE + 1;
  9355. FULL : \vexception\v1100. renames TABLE_MANAGER.TABLE_FULL; -- see 7.5
  9356. package TM renames TABLE_MANAGER;
  9357. function REAL_PLUS(LEFT, RIGHT : REAL   ) return REAL    renames "+";
  9358. function INT_PLUS (LEFT, RIGHT : INTEGER) return INTEGER renames "+";
  9359. function ROUGE return COLOR renames RED;  --  see 3.5.1
  9360. function ROT   return COLOR renames RED;
  9361. function ROSSO return COLOR renames ROUGE;
  9362. function NEXT(X : COLOR) return COLOR renames COLOR'SUCC; -- see 3.5.5
  9363. Example of a renaming declaration with new parameter names:
  9364. function "*" (X,Y : VECTOR) return REAL renames DOT_PRODUCT; -- see 6.1
  9365. Example of a renaming declaration with a new default expression:
  9366. function MINIMUM(L : LINK := HEAD) return CELL renames MIN_CELL;
  9367. -- see 6.1
  9368. \uNotes:\n
  9369. Renaming may be used to resolve name conflicts and to act as  a  shorthand.
  9370. Renaming  with  a different \videntifier\v203. or operator symbol does not hide the
  9371. old name;  the new name and the old name need not be \vvisible\v803.  at  the  same
  9372. points.    The   attributes  POS  and  VAL  cannot  be  renamed  since  the
  9373. corresponding specifications cannot be written;  the  same  holds  for  the
  9374. predefined multiplying operators with a universal_fixed result.
  9375. Calls  with  the  new name of a renamed entry are \vprocedure call statements\v606.
  9376. and are not allowed at places where  the  syntax  requires  an  \ventry  call\v905.
  9377. \vstatement\v905.  in  \vconditional  and  timed  entry  calls\v909.;  similarly, the COUNT
  9378. \vattribute\v405. is not available for the new name.
  9379. A \vtask object\v902. that is declared by an object declaration can be  renamed  as
  9380. an   object.    However,   a  single  task  cannot  be  renamed  since  the
  9381. corresponding task type is anonymous.  For similar reasons, an object of an
  9382. anonymous array type cannot be  renamed.   No  syntactic  form  exists  for
  9383. renaming a generic unit.
  9384. A subtype can be used to achieve the effect of renaming a type (including a
  9385. task type) as in
  9386. subtype MODE is TEXT_IO.FILE_MODE;
  9387. 8.6  \uThe Package Standard\n
  9388. The predefined \vtypes\v305. (for example the types BOOLEAN, CHARACTER and INTEGER)
  9389. are  the  types  that are declared in a predefined \vpackage\v700. called STANDARD;
  9390. this package also includes the \vdeclarations\v301. of their predefined operations.
  9391. The package STANDARD is described in Annex C.  Apart  from  the  predefined
  9392. numeric  types,  the specification of the package STANDARD \vmust\v108. be the same
  9393. for all implementations of the language.
  9394. The package STANDARD  forms  a  \vdeclarative  region\v801.  which  encloses  every
  9395. \vlibrary  unit\v1001.  and consequently the \vmain program\v1001.;  the declaration of every
  9396. library unit is assumed to \voccur  immediately  within\v801.  this  package.   The
  9397. \vimplicit  declarations\v301. of library units are assumed to be ordered in such a
  9398. way that the scope of a given library unit includes  any  compilation  unit
  9399. that  mentions  the given library unit in a \vwith clause\v1002..  However, the only
  9400. library units that are visible within  a  given  compilation  unit  are  as
  9401. follows:   they  include  the  library units \vnamed\v401. by all with clauses that
  9402. apply to the given unit, and moreover, if the given  unit  is  a  \vsecondary\v1001.
  9403. \vunit\v1001. of some library unit, they include this library unit.
  9404. \uNotes:\n
  9405. If  all  \vblock  statements\v507.  of  a  program are named, then the name of each
  9406. \vprogram unit\v600. can always be  written  as  an  \vexpanded  name\v404.  starting  with
  9407. STANDARD (unless this package is itself hidden).
  9408. If  a type is declared in the visible part of a library package, then it is
  9409. a consequence of the \vvisibility\v803. rules  that  a  basic  operation  (such  as
  9410. \vassignment\v502.)  for  this  type  is  directly visible at places where the type
  9411. itself is not visible (whether by selection  or  directly).   However  this
  9412. operation  can  only  be  applied  to  operands  that  are  visible and the
  9413. declaration of these operands requires the visibility of either the type or
  9414. one of its \vsubtypes\v305..
  9415. 8.7  \uThe Context of Overload Resolution\n
  9416. \vOverloading\v610. is defined for \vsubprograms\v600.,  \venumeration  literals\v311.,  \voperators\v411.,
  9417. and  single  entries,  and  also  for  the  \voperations\v308. that are inherent in
  9418. several \vbasic operations\v308. such as \vassignment\v502., \vmembership tests\v413.,  \vallocators\v421.,
  9419. the \vliteral null\v330., \vaggregates\v407., and \vstring literals\v406..
  9420. For  overloaded entities, overload resolution determines the actual meaning
  9421. that an occurrence of an \videntifier\v203. has, whenever the \vvisibility\v803. rules have
  9422. determined that more than one meaning is acceptable at the  place  of  this
  9423. occurrence;   overload resolution likewise determines the actual meaning of
  9424. an occurrence of an operator or some basic operation.
  9425. At such a place all visible \vdeclarations\v301. are considered.  The occurrence is
  9426. only \vlegal\v108. if there is exactly one interpretation of  each  constituent  of
  9427. the  innermost  complete  context;   a  complete  context  is  one  of  the
  9428. following:
  9429. -  A declaration.
  9430. -  A \vstatement\v500..
  9431. -  A \vrepresentation clause\v1301..
  9432. When considering possible interpretations of a complete context,  the  only
  9433. rules  considered are the syntax rules, the scope and visibility rules, and
  9434. the rules of the form described below.
  9435. (a)  Any rule that requires a \vname\v401. or \vexpression\v410. to have a certain type, or
  9436. to have the same type as another name or expression.
  9437. (b)  Any rule that requires the type of a name or expression to be  a  type
  9438. of  a certain class;  similarly, any rule that requires a certain type
  9439. to be a discrete, integer, real,  universal,  character,  boolean,  or
  9440. nonlimited type.
  9441. (c)  Any rule that requires a prefix to be appropriate for a certain  type.
  9442. (d)  Any rule that specifies a certain type as the result type of  a  basic
  9443. operation,  and any rule that specifies that this type is of a certain
  9444. class.
  9445. (e)  The rules that require the type of an aggregate or string  \vliteral\v406.  to
  9446. be  determinable  solely  from the enclosing complete context (see 4.3
  9447. and 4.2).  Similarly, the rules that require the type of the prefix of
  9448. an attribute, the type of the expression of a \vcase statement\v505.,  or  the
  9449. type  of  the  operand  of  a  \vtype  conversion\v419.,  to  be  determinable
  9450. independently of the context (see 4.1.4, 5.4, 4.6, and 6.4.1).
  9451. (f)  The rules given in section  6.6,  for  the  resolution  of  overloaded
  9452. subprogram  calls;   in  section  4.6, for the implicit conversions of
  9453. universal expressions;  in section 3.6.1, for  the  interpretation  of
  9454. \vdiscrete  ranges\v322.  with bounds having a universal type;  and in section
  9455. 4.1.3, for the interpretation of an expanded name whose prefix denotes
  9456. a subprogram or an accept statement.
  9457. Subprogram names used as \vpragma\v210. arguments follow  a  different  rule:   the
  9458. pragma can apply to several overloaded subprograms, as explained in section
  9459. 6.3.2  for  the pragma INLINE, in section 11.7 for the pragma SUPPRESS, and
  9460. in section 13.9 for the pragma INTERFACE.
  9461. Similarly, the simple names given in context clauses (see  10.1.1)  and  in
  9462. \vaddress clauses\v1305. follow different rules.
  9463. \uNotes:\n
  9464. If  there  is  only one possible interpretation, the identifier denotes the
  9465. corresponding entity.  However, this does not mean that the  occurrence  is
  9466. necessarily  legal  since other requirements exist which are not considered
  9467. for overload resolution;  for example,  the  fact  that  an  expression  is
  9468. \vstatic\v422.,  the  parameter  modes,  whether an object is constant, \vconformance\v905.
  9469. \vrules\v905.,  forcing  occurrences  for  a  representation   clause,   order   of
  9470. elaboration, and so on.
  9471. Similarly,  \vsubtypes\v305.  are  not  considered  for  overload  resolution  (the
  9472. violation of a constraint does not make a program  illegal  but  raises  an
  9473. \vexception\v1100. during program execution).
  9474. A \vloop parameter specification\v506. is  a  declaration,  and  hence  a  complete
  9475. context.
  9476. Rules that require certain constructs to have the same parameter and result
  9477. type  profile  fall  under the category (a);  the same holds for rules that
  9478. require conformance of  two  constructs  since  conformance  requires  that
  9479. corresponding  names  be  given  the  same  meaning  by  the visibility and
  9480. overloading rules.
  9481. 9. \uTasks\n
  9482. The execution of a program that does not contain a task is defined in terms
  9483. of a sequential execution of its actions, according to the rules  described
  9484. in  other  chapters  of this manual.  These actions can be considered to be
  9485. executed by a single logical processor.
  9486. Tasks are entities whose executions proceed in parallel  in  the  following
  9487. sense.   Each  task can be considered to be executed by a logical processor
  9488. of  its  own.   Different  tasks  (different  logical  processors)  proceed
  9489. independently, except at points where they synchronize.
  9490. Some  tasks have entries.  An \ventry\v905. of a task can be called by other tasks.
  9491. A task accepts a call  of  one  of  its  entries  by  executing  an  \vaccept\v905.
  9492. \vstatement\v905. for the entry.  Synchronization is achieved by \vrendezvous\v905. between
  9493. a  task  issuing an entry call and a task accepting the call.  Some entries
  9494. have parameters;  entry calls and accept statements for  such  entries  are
  9495. the principal means of communicating values between tasks.
  9496. The  properties of each task are defined by a corresponding task unit which
  9497. consists of a \vtask specification\v901. and a \vtask body\v901..  Task units  are  one  of
  9498. the  four  forms  of  \vprogram  unit\v600. of which programs can be composed.  The
  9499. other forms are \vsubprograms\v600., \vpackages\v700. and \vgeneric units\v1200..  The properties of
  9500. task units,  tasks,  and  entries,  and  the  statements  that  affect  the
  9501. interaction   between   tasks  (that  is,  \ventry  call  statements\v905.,  accept
  9502. statements, \vdelay statements\v906., \vselect statements\v907., and \vabort statements\v913.)  are
  9503. described in this chapter.
  9504. Note:
  9505. Parallel   tasks  (parallel  logical  processors)  may  be  implemented  on
  9506. multicomputers, multiprocessors, or with interleaved execution on a  single
  9507. physical  processor.   On  the  other  hand, whenever an implementation can
  9508. detect that the same effect can be guaranteed if parts of the actions of  a
  9509. given  task  are  executed  by  different  physical  processors  acting  in
  9510. parallel, it may choose to execute them in  this  way;   in  such  a  case,
  9511. several physical processors implement a single logical processor.
  9512. More details:
  9513.  9.1     \vTask Specifications and Task Bodies\v901.
  9514.  9.2     \vTask Types and Task Objects\v902.
  9515.  9.3     \vTask Execution - Task Activation\v903.
  9516.  9.4     \vTask Dependence - Termination of Tasks\v904.
  9517.  9.5     \vEntries, Entry Calls and Accept Statements\v905.
  9518.  9.6     \vDelay Statements, Duration and Time\v906.
  9519.  9.7     \vSelect Statements\v907.
  9520.  9.8     \vPriorities\v911.
  9521.  9.9     \vTask and Entry Attributes\v912.
  9522.  9.10    \vAbort Statements\v913.
  9523.  9.11    \vShared Variables\v914.
  9524.  9.12    \vExample of Tasking\v915.
  9525. 9.1  \uTask Specifications and Task Bodies\n
  9526. A task unit consists of a task specification  and  a  task  body.   A  task
  9527. specification  that  starts  with  the \vreserved words\v211.  task \vtype\v305. declares a
  9528. task type.  The value of an \vobject\v302. of a task type designates a task  having
  9529. the  entries,  if  any, that are declared in the task specification;  these
  9530. entries are also called entries of this object.  The execution of the  task
  9531. is defined by the corresponding task body.
  9532. A  task specification without the reserved word type defines a single task.
  9533. A task declaration with this form of specification  is  equivalent  to  the
  9534. \vdeclaration\v301.   of  an  anonymous  task  type  immediately  followed  by  the
  9535. \vdeclaration of an object\v303. of the task type, and  the  task  unit  \videntifier\v203.
  9536. names the object.  In the remainder of this chapter, explanations are given
  9537. in  terms  of  task  \vtype declarations\v306.;  the corresponding explanations for
  9538. single task declarations follow from the stated equivalence.
  9539.     task_declaration ::= task_specification;
  9540.     task_specification ::=
  9541.        task [type] identifier [is
  9542.           {\ventry_declaration\v905.}
  9543.           {\vrepresentation_clause\v1301.}
  9544.        end [task_simple_name]]
  9545.     task_body ::=
  9546.         task body task_simple_name is
  9547.            [\vdeclarative_part\v333.]
  9548.         begin
  9549.             sequence_of_statements
  9550.        [exception
  9551.             exception_handler
  9552.            {exception_handler}]
  9553.         end [task_simple_name];
  9554. The \vsimple name\v401. at the start of a task  body  must  repeat  the  task  unit
  9555. identifier.   Similarly  if  a  simple  name appears at the end of the task
  9556. specification or body, it must repeat the task unit identifier.   Within  a
  9557. task  body,  the  name  of  the corresponding task unit can also be used to
  9558. refer to the task object that designates the task currently  executing  the
  9559. body;   furthermore,  the  use  of  this name as a type mark is not allowed
  9560. within the task unit itself.
  9561. For the  \velaboration\v333.  of  a  task  specification,  \ventry\v905.  declarations  and
  9562. representation  clauses,  if  any, are elaborated in the order given.  Such
  9563. representation clauses only apply to  the  entries  declared  in  the  task
  9564. specification (see 13.5).
  9565. The  elaboration  of a task body has no other effect than to establish that
  9566. the body can from then on be used for the execution of tasks designated  by
  9567. objects of the corresponding task type.
  9568. The  execution of a task body is invoked by the activation of a task object
  9569. of the corresponding type (see 9.3).  The optional  \vexception  handlers\v1102.  at
  9570. the end of a task body handle exceptions raised during the execution of the
  9571. \vsequence of statements\v501. of the task body (see 11.4).
  9572. Examples of specifications of task types:
  9573.     task type RESOURCE is
  9574.        entry SEIZE;
  9575.        entry RELEASE;
  9576.     end RESOURCE;
  9577.     task type KEYBOARD_DRIVER is
  9578.        entry READ (C : out CHARACTER);
  9579.        entry WRITE(C : in  CHARACTER);
  9580.     end KEYBOARD_DRIVER;
  9581. Examples of specifications of single tasks:
  9582.     task PRODUCER_CONSUMER is
  9583.        entry READ (V : out ITEM);
  9584.        entry WRITE(E : in  ITEM);
  9585.     end;
  9586.     task CONTROLLER is
  9587.        entry REQUEST(LEVEL)(D : ITEM);  --  a family of entries
  9588.     end CONTROLLER;
  9589.     task USER;  --  has no entries
  9590. Example of task specification and corresponding body:
  9591.     task PROTECTED_ARRAY is
  9592.        --  INDEX and ITEM are global types
  9593.        entry READ (N : in INDEX; V : out ITEM);
  9594.        entry WRITE(N : in INDEX; E : in  ITEM);
  9595.     end;
  9596.     task body PROTECTED_ARRAY is
  9597.        TABLE : \uarray\n(INDEX) of ITEM := (INDEX => NULL_ITEM);
  9598.     begin
  9599.        loop
  9600.           select
  9601.              \uaccept\n READ (N : in INDEX; V : out ITEM) do
  9602.                 V := TABLE(N);
  9603.              end READ;
  9604.           or
  9605.              \uaccept\n WRITE(N : in INDEX; E : in  ITEM) do
  9606.                 TABLE(N) := E;
  9607.              end WRITE;
  9608.           end select;
  9609.        end loop;
  9610.     end PROTECTED_ARRAY;
  9611. Note:
  9612. A task specification specifies the interface of tasks of the task type with
  9613. other  tasks  of  the  same  or  of different types, and also with the \vmain\v1001.
  9614. \vprogram\v1001..
  9615. 9.2  \uTask Types and Task Objects\n
  9616. A task type is a \vlimited type\v708..  Hence  neither  \vassignment\v502.  nor
  9617. the  predefined  comparison  for  \vequality\v413.  and  \vinequality\v413. are defined for
  9618. \vobjects\v302. of task types;  moreover, the mode out is not allowed for a  \vformal\v602.
  9619. \vparameter\v602. whose \vtype\v305. is a task type.
  9620. A  task object is an object whose type is a task type.  The value of a task
  9621. object \vdesignates\v330. a task that has the entries  of  the  corresponding  task
  9622. type,  and whose execution is specified by the corresponding \vtask body\v901..  If
  9623. a task object is the object, or a \vsubcomponent\v305. of the object,  declared  by
  9624. an  \vobject declaration\v303., then the value of the task object is defined by the
  9625. \velaboration\v333. of the object declaration.  If a task object is the object,  or
  9626. a  subcomponent  of  the object, created by the evaluation of an \vallocator\v421.,
  9627. then the value of the task object is  defined  by  the  evaluation  of  the
  9628. allocator.   For  all  parameter modes, if an \vactual parameter\v607. designates a
  9629. task, the associated formal parameter designates the same task;   the  same
  9630. holds  for  a  subcomponent  of  an  actual parameter and the corresponding
  9631. subcomponent of the associated formal parameter;  finally, the  same  holds
  9632. for generic parameters.
  9633. \uExamples:\n
  9634.     CONTROL  : RESOURCE;
  9635.     TELETYPE : KEYBOARD_DRIVER;
  9636.     POOL     : \uarray\n(1 .. 10) of KEYBOARD_DRIVER;
  9637.     --  see also examples of declarations of single tasks in 9.1
  9638. Example of \vaccess type\v330. designating task objects:
  9639.     type KEYBOARD is \uaccess\n KEYBOARD_DRIVER;
  9640.     TERMINAL : KEYBOARD := new KEYBOARD_DRIVER;
  9641. \uNotes:\n
  9642. Since  a  task type is a limited type, it can appear as the definition of a
  9643. limited \vprivate type\v704. in a \vprivate part\v702., and as a \vgeneric  actual  parameter\v1206.
  9644. associated  with  a  formal parameter whose type is a limited type.  On the
  9645. other hand, the type of a \vgeneric formal parameter of mode\v1202. in must not be a
  9646. limited type and hence cannot be a task type.
  9647. Task objects behave as \vconstants\v303. (a task object always designates the  same
  9648. task)  since  their  values are implicitly defined either at declaration or
  9649. allocation, or by a \vparameter  association\v606.,  and  since  no  assignment  is
  9650. available.   However  the  \vreserved  word\v211.  constant  is  not allowed in the
  9651. declaration  of  a  task  object  since  this  would  require  an  explicit
  9652. \vinitialization\v303..   A  task object that is a formal parameter of mode in is a
  9653. constant (as is any formal parameter of this mode).
  9654. If an application needs to store and exchange task identities, it can do so
  9655. by defining an access type designating the corresponding task  objects  and
  9656. by  using  access  values  for identification purposes (see above example).
  9657. Assignment is available for such an access type as for any access type.
  9658. \vSubtype declarations\v307. are allowed for task types as  for  other  types,  but
  9659. there are no \vconstraints\v305. applicable to task types.
  9660. 9.3  \uTask Execution - Task Activation\n
  9661. A  \vtask body\v901. defines the execution of any task that is designated by a \vtask\v902.
  9662. \vobject\v902. of the corresponding \vtask type\v901..  The initial part of this  execution
  9663. is  called  the  activation  of  the  task  object,  and  also  that of the
  9664. designated task;  it consists of the \velaboration\v333. of the  \vdeclarative  part\v333.,
  9665. if  any, of the task body.  The execution of different tasks, in particular
  9666. their activation, proceeds in \vparallel\v900..
  9667. If an object declaration that declares a  task  object  occurs  immediately
  9668. within  a  declarative  part, then the activation of the task object starts
  9669. after the elaboration of the declarative part (that is, after  passing  the
  9670. reserved  word  begin following the declarative part);  similarly if such a
  9671. declaration  occurs  immediately  within  a  package   specification,   the
  9672. activation  starts  after  the  elaboration  of the declarative part of the
  9673. \vpackage body\v701..  The same holds for the activation of a task object that is a
  9674. \vsubcomponent\v305. of an object declared immediately within a declarative part or
  9675. package specification.  The first \vstatement\v500. following the declarative  part
  9676. is  executed only after conclusion of the activation of these task objects.
  9677. Should an \vexception\v1100. be raised by the activation of one of these tasks, that
  9678. task becomes a \vcompleted task\v904.;   other  tasks  are  not  directly
  9679. affected.   Should  one  of  these  tasks  thus become completed during its
  9680. activation, the \vexception TASKING_ERROR\v1101. is raised upon  conclusion  of  the
  9681. activation  of  all  of  these  tasks  (whether  successfully or not);  the
  9682. exception is raised at  a  place  that  is  immediately  before  the  first
  9683. statement  following  the  declarative part (immediately after the reserved
  9684. word begin).  Should several of these tasks thus  become  completed  during
  9685. their activation, the exception TASKING_ERROR is raised only once.
  9686. Should  an  exception be raised by the elaboration of a declarative part or
  9687. package  specification,  then  any  task  that  is  created  (directly   or
  9688. indirectly)  by  this  elaboration  and  that  is not yet activated becomes
  9689. terminated and is therefore  never  activated  (see  section  9.4  for  the
  9690. definition of a terminated task).
  9691. For  the  above  rules,  in  any  package  body  without statements, a null
  9692. statement is assumed.  For any package without a package body, an  implicit
  9693. package  body  containing a single null statement is assumed.  If a package
  9694. without a package body is declared immediately within some program unit  or
  9695. block  statement,  the  implicit  package  body  occurs  at  the end of the
  9696. declarative part of the program unit or  block  statement;   if  there  are
  9697. several  such  packages,  the  order  of  the  implicit  package  bodies is
  9698. undefined.
  9699. A task object that is the object, or a subcomponent of the object,  created
  9700. by  the  evaluation  of  an \vallocator\v421. is activated by this evaluation.  The
  9701. activation starts after any initialization for the object  created  by  the
  9702. allocator;   if  several subcomponents are task objects, they are activated
  9703. in parallel.  The access value designating such an object  is  returned  by
  9704. the allocator only after the conclusion of these activations.
  9705. Should an exception be raised by the activation of one of these tasks, that
  9706. task  becomes  a  completed  task;   other tasks are not directly affected.
  9707. Should one of these tasks thus become completed during its activation,  the
  9708. exception  TASKING_ERROR is raised upon conclusion of the activation of all
  9709. of these tasks (whether successfully or not);  the exception is  raised  at
  9710. the  place where the allocator is evaluated.  Should several of these tasks
  9711. thus become completed during their activation, the exception  TASKING_ERROR
  9712. is raised only once.
  9713. Should  an  exception be raised by the initialization of the object created
  9714. by an allocator (hence before  the  start  of  any  activation),  any  task
  9715. designated  by  a  subcomponent  of  this  object becomes terminated and is
  9716. therefore never activated.
  9717. Example:
  9718.     procedure P is
  9719.        A, B : RESOURCE;  --  elaborate the task objects A, B
  9720.        C    : RESOURCE;  --  elaborate the task object C
  9721.     begin
  9722.        --  the tasks A, B, C are activated in parallel
  9723.            before the first statement
  9724.        ...
  9725.     end;
  9726. \uNotes:\n
  9727. An \ventry\v905. of a task can be called before the task has  been  activated.   If
  9728. several  tasks  are  activated  in  parallel, the execution of any of these
  9729. tasks need not await the end of the activation  of the other tasks.  A task
  9730. may become completed during its activation either because of  an  exception
  9731. or because it is aborted (see 9.10).
  9732. 9.4  \uTask Dependence - Termination of Tasks\n
  9733. Each task depends on at least one master.  A master is a construct that  is
  9734. either  a  task,  a currently executing \vblock statement\v507. or subprogram, or a
  9735. library package (a \vpackage\v700. declared within another \vprogram unit\v600.  is  not  a
  9736. master).   The  dependence  on  a  master  is  a  direct  dependence in the
  9737. following two cases:
  9738. (a)  The task designated by  a  \vtask  object\v902.  that  is  the  \vobject\v302.,  or  a
  9739.      \vsubcomponent\v305.  of the object, created by the evaluation of an \vallocator\v421.
  9740.      depends on the master that elaborates the  corresponding  \vaccess  type\v330.
  9741.      definition.
  9742. (b)  The task designated by any other task object  depends  on  the  master
  9743.      whose execution creates the task object.
  9744. Furthermore,  if a task depends on a given master that is a block \vstatement\v500.
  9745. executed by another master, then  the  task  depends  also  on  this  other
  9746. master,  in  an  indirect  manner;  the same holds if the given master is a
  9747. subprogram called by another master, and if the given master is a task that
  9748. depends (directly or indirectly) on another master.  Dependences exist  for
  9749. objects  of  a  private  type  whose full \vdeclaration\v301. is in terms of a task
  9750. type.
  9751. A task is said to have completed its execution when  it  has  finished  the
  9752. execution  of  the  \vsequence  of statements\v501. that appears after the reserved
  9753. word  begin in the corresponding body.  Similarly a block or  a  subprogram
  9754. is  said to have completed its execution when it has finished the execution
  9755. of the corresponding sequence of statements.  For a  block  statement,  the
  9756. execution  is also said to be completed when it reaches an \vexit\v508., return, or
  9757. \vgoto statement\v510. transferring control out of the block.  For a procedure, the
  9758. execution is  also  said  to  be  completed  when  a  corresponding  \vreturn\v509.
  9759. \vstatement\v509.  is  reached.   For  a \vfunction\v609., the execution is also said to be
  9760. completed after the  evaluation  of  the  result  expression  of  a  return
  9761. statement.  Finally the execution of a task, block statement, or subprogram
  9762. is  completed if an \vexception\v1100. is raised by the execution of its sequence of
  9763. statements and there is no corresponding \vhandler\v1102., or, if there is one, when
  9764. it has finished the execution of the corresponding handler.
  9765. If a task has no dependent task, its termination takes place  when  it  has
  9766. completed  its  execution.   After  its  termination,  a task is said to be
  9767. terminated.  If a task has dependent tasks,  its  termination  takes  place
  9768. when  the  execution  of  the task is completed and all dependent tasks are
  9769. terminated.  A block  statement  or  \vsubprogram  body\v603.  whose  execution  is
  9770. completed is not left until all of its dependent tasks are terminated.
  9771. Termination  of  a  task otherwise takes place if and only if its execution
  9772. has reached an \vopen  terminate  alternative\v908.  in  a  select  statement  (see
  9773. 9.7.1), and the following conditions are satisfied:
  9774.   -  The task depends on some master whose execution  is  completed  (hence
  9775.      not a library package).
  9776.   -  Each task that depends on the  master  considered  is  either  already
  9777.      terminated  or similarly waiting on an open \vterminate alternative\v908. of a
  9778.      select statement.
  9779. When both conditions are satisfied, the task considered becomes terminated,
  9780. together with all tasks that depend on the master considered.
  9781. Example:
  9782.     declare
  9783.        type GLOBAL is \uaccess\n RESOURCE;          --  see 9.1
  9784.        A, B : RESOURCE;
  9785.        G    : GLOBAL;
  9786.     begin
  9787.        --  activation of A and B
  9788.        declare
  9789.           type LOCAL is \uaccess\n RESOURCE;
  9790.           X : GLOBAL := new RESOURCE;  --  activation of X.\uall\n
  9791.           L : LOCAL  := new RESOURCE;  --  activation of L.\uall\n
  9792.           C : RESOURCE;
  9793.        begin
  9794.           --  activation of C
  9795.           G := X;  --  both G and X \vdesignate\v330. the same task object
  9796.           ...
  9797.        end;  --  await termination of C and L.\uall\n (but not X.\uall\n)
  9798.        ...
  9799.     end;  --  await termination of A, B, and G.\uall\n
  9800. \uNotes:\n
  9801. The rules given for termination imply that all tasks that depend  (directly
  9802. or  indirectly)  on a given master and that are not already terminated, can
  9803. be terminated (collectively) if and only if each of them is waiting  on  an
  9804. open  terminate  alternative of a select statement and the execution of the
  9805. given master is completed.
  9806. The usual rules apply to the \vmain program\v1001..   Consequently,  termination  of
  9807. the  main  program  awaits  termination  of  any dependent task even if the
  9808. corresponding task type is declared in a library  package.   On  the  other
  9809. hand,  termination  of the main program does not await termination of tasks
  9810. that depend on library packages;  the language does not define whether such
  9811. tasks are required to terminate.
  9812. For an access type derived from  another  access  type,  the  corresponding
  9813. access  type  definition  is that of the parent type;  the dependence is on
  9814. the master that elaborates the ultimate parent access type definition.
  9815. A \vrenaming declaration\v805. defines a new name for an existing entity and  hence
  9816. creates no further dependence.
  9817. 9.5  \uEntries, Entry Calls, and Accept Statements\n
  9818. Entry calls and accept statements are the primary means of  synchronization
  9819. of  \vtasks\v900., and of communicating values between tasks.  An entry declaration
  9820. is similar to a \vsubprogram declaration\v601.  and  is  only  allowed  in  a  \vtask\v901.
  9821. \vspecification\v901..   The  actions  to  be performed when an entry is called are
  9822. specified by corresponding accept statements.
  9823.     entry_declaration ::=
  9824.        entry identifier [(discrete_range)] [formal_part];
  9825.     entry_call_statement ::= entry_name [\vactual_parameter_part\v606.];
  9826.     accept_statement ::=
  9827.        \uaccept\n entry_simple_name [(entry_index)] [formal_part] [do
  9828.           sequence_of_statements
  9829.        end [entry_simple_name]];
  9830.     entry_index ::= \vexpression\v410.
  9831. An entry declaration that includes a \vdiscrete range\v322. declares  a
  9832. family  of distinct entries having the same \vformal part\v601. (if any);  that is,
  9833. one such entry for each value of the discrete range.  The term single entry
  9834. is used in the definition of any rule that applies to any entry other  than
  9835. one  of  a family.  The task designated by an \vobject\v302. of a task type has (or
  9836. owns) the entries declared in the specification of the task type.
  9837. Within the body of a task, each of its single entries or entry families can
  9838. be named by the corresponding \vsimple name\v401..  The  \vname\v401.  of  an  entry  of  a
  9839. family takes the form of an \vindexed component\v402., the family simple name being
  9840. followed  by  the index in parentheses;  the type of this index must be the
  9841. same as that of the  discrete  range  in  the  corresponding  entry  family
  9842. declaration.   Outside  the  body of a task an entry name has the form of a
  9843. \vselected component\v404.,  whose  \vprefix\v401.  denotes  the  task  object,  and  whose
  9844. \vselector\v404. is the simple name of one of its single entries or entry families.
  9845. A  single  entry overloads a \vsubprogram\v600., an \venumeration literal\v311., or another
  9846. single entry if they have the same \videntifier\v203..  \vOverloading\v610. is not  defined
  9847. for  entry  families.  A single entry or an entry of an entry family can be
  9848. renamed as a \vprocedure\v600. as explained in section 8.5.
  9849. The parameter modes defined for parameters of the formal part of  an  entry
  9850. declaration  are the same as for a subprogram declaration and have the same
  9851. meaning (see 6.2).  The syntax of an entry call  statement  is  similar  to
  9852. that   of   a  \vprocedure  call\v606.  statement,  and  the  rules  for  parameter
  9853. associations are the same as for subprogram calls (see 6.4.1 and 6.4.2).
  9854. An accept statement specifies the actions to be performed at a  call  of  a
  9855. named entry (it can be an entry of a family).  The formal part of an accept
  9856. statement  must  conform to the formal part given in the declaration of the
  9857. single entry or entry family named by the  accept  statement  (see  section
  9858. 6.3.1  for  the \vconformance rules\v604.).  If a simple name appears at the end of
  9859. an accept statement, it must repeat that given at the start.
  9860. An accept statement for an entry of a given task is only allowed within the
  9861. corresponding \vtask body\v901.;  excluding within the body  of  any  program  unit
  9862. that  is,  itself,  inner  to  the task body;  and excluding within another
  9863. accept statement for either the same single entry or an entry of  the  same
  9864. family.   (One  consequence  of this rule is that a task can execute accept
  9865. statements only for its own entries.)  A task body can  contain  more  than
  9866. one accept statement for the same entry.
  9867. For the \velaboration\v301. of an entry declaration, the discrete range, if any, is
  9868. evaluated  and  the  formal  part,  if  any,  is  then  elaborated as for a
  9869. subprogram declaration.
  9870. Execution of an accept statement starts with the \vevaluation\v411.  of  the  entry
  9871. index  (in  the  case of an entry of a family).  Execution of an entry call
  9872. statement starts with the evaluation of the entry name;  this  is  followed
  9873. by any evaluations required for actual parameters in the same manner as for
  9874. a  subprogram call (see 6.4).  Further execution of an accept statement and
  9875. of a corresponding entry call statement are synchronized.
  9876. If a given entry is called by only one task, there are  two  possibilities:
  9877.   -  If  the  calling  task  issues  an  entry  call  statement  before   a
  9878.      corresponding  accept  statement  is  reached  by  the task owning the
  9879.      entry, the execution of the calling task is suspended.
  9880.   -  If a task reaches an accept statement prior to any call of that entry,
  9881.      the execution of the task is suspended until such a call is  received.
  9882. When an entry has been called and a corresponding accept statement has been
  9883. reached,  the  \vsequence  of  statements\v501., if any, of the accept statement is
  9884. executed by the called task (while the  calling  task  remains  suspended).
  9885. This  interaction is called a rendezvous.  Thereafter, the calling task and
  9886. the task owning the entry continue their \vexecution in parallel\v900..
  9887. If several  tasks  call  the  same  entry  before  a  corresponding  accept
  9888. statement  is reached, the calls are queued;  there is one queue associated
  9889. with each entry.  Each execution of an accept statement  removes  one  call
  9890. from the queue.  The calls are processed in the order of arrival.
  9891. An  attempt  to  call  an  entry of a task that has completed its execution
  9892. raises the \vexception TASKING_ERROR\v1101. at the point of the call, in the calling
  9893. task;  similarly, this exception is raised at the point of the call if  the
  9894. called  \vtask completes\v904.  its  execution before accepting the call (see also
  9895. 9.10 for the case when the called \vtask becomes  abnormal\v913.).   The  \vexception\v1101.
  9896. \vCONSTRAINT_ERROR\v1101.  is  raised  if  the  index of an entry of a family is not
  9897. within the specified discrete range.
  9898. Examples of entry declarations:
  9899.     entry READ(V : out ITEM);
  9900.     entry SEIZE;
  9901.     entry REQUEST(LEVEL)(D : ITEM);  --  a family of entries
  9902. Examples of entry calls:
  9903.     CONTROL.RELEASE;                      --  see 9.2 and 9.1
  9904.     PRODUCER_CONSUMER.WRITE(E);           --  see 9.1
  9905.     POOL(5).READ(NEXT_CHAR);              --  see 9.2 and 9.1
  9906.     CONTROLLER.REQUEST(LOW)(SOME_ITEM);   --  see 9.1
  9907. Examples of accept statements:
  9908.     \uaccept\n SEIZE;
  9909.     \uaccept\n READ(V : out ITEM) do
  9910.        V := LOCAL_ITEM;
  9911.     end READ;
  9912.     \uaccept\n REQUEST(LOW)(D : ITEM) do
  9913.        ...
  9914.     end REQUEST;
  9915. \uNotes:\n
  9916. The formal part given in an accept statement is not elaborated; it is  only
  9917. used to identify the corresponding entry.
  9918. An  accept  statement   can  call  subprograms  that issue entry calls.  An
  9919. accept statement need not  have  a  sequence  of  statements  even  if  the
  9920. corresponding  entry  has  parameters.   Equally, it can have a sequence of
  9921. statements even if the corresponding entry has no parameters.  The sequence
  9922. of statements of an accept statement can include \vreturn statements\v509..  A task
  9923. can call its own entries but it will, of course,  deadlock.   The  language
  9924. permits  \vconditional\v909.  and  \vtimed  entry  calls\v910..  The
  9925. language rules ensure that a task can only be in one entry queue at a given
  9926. time.
  9927. If the bounds of  the  discrete  range  of  an  entry  family  are  integer
  9928. literals,  the  index (in an entry name or accept statement) must be of the
  9929. predefined \vtype INTEGER\v314. (see 3.6.1).
  9930. 9.6  \uDelay Statements, Duration, and Time\n
  9931. The execution of a delay \vstatement\v500. evaluates  the  \vsimple  expression\v410.,  and
  9932. suspends  further  execution of the \vtask\v900. that executes the delay statement,
  9933. for at least the duration specified by the resulting value.
  9934.     delay_statement ::= delay simple_expression;
  9935. The simple expression must be of the predefined \vfixed point type\v319.  DURATION;
  9936. its value is expressed in seconds;  a delay statement with a negative value
  9937. is equivalent to a delay statement with a zero value.
  9938. Any  implementation  of  the  type  \vDURATION\v1700.  must  allow representation of
  9939. durations (both positive and negative) up to at least  86400  seconds  (one
  9940. day);   the  smallest  representable  duration,  DURATION'SMALL must not be
  9941. greater than twenty milliseconds (whenever possible, a  value  not  greater
  9942. than  fifty  microseconds should be chosen).  Note that DURATION'SMALL need
  9943. not correspond to the basic clock cycle, the named number SYSTEM.TICK  (see
  9944. 13.7).
  9945. The  definition  of  the  \vtype\v305.  TIME  is provided in the predefined \vlibrary\v1001.
  9946. \vpackage\v700. CALENDAR.  The function CLOCK returns the current value of TIME  at
  9947. the  time  it is called.  The functions YEAR, MONTH, DAY and SECONDS return
  9948. the corresponding values for a given value of the type TIME;  the procedure
  9949. SPLIT returns all four  corresponding  values.   Conversely,  the  function
  9950. TIME_OF  combines  a  year  number,  a  month  number,  a day number, and a
  9951. duration, into a value of  type  TIME.   The  \voperators\v411.  "+"  and  "-"  for
  9952. \vaddition\v411.  and  subtraction  of  times  and  durations,  and  the \vrelational\v411.
  9953. \voperators\v411. for times, have the conventional meaning.
  9954. The exception TIME_ERROR is raised by the function TIME_OF  if  the  actual
  9955. parameters do not form a proper date.  This exception is also raised by the
  9956. operators  "+"  and  "-" if, for the given operands, these operators cannot
  9957. return a date whose year number  is  in  the  range  of  the  corresponding
  9958. subtype, or if the operator "-" cannot return a result that is in the range
  9959. of the type DURATION.
  9960.     package CALENDAR is
  9961.        type TIME is private;
  9962.        subtype YEAR_NUMBER  is INTEGER  range 1901 .. 2099;
  9963.        subtype MONTH_NUMBER is INTEGER  range 1 .. 12;
  9964.        subtype DAY_NUMBER   is INTEGER  range 1 .. 31;
  9965.        subtype DAY_DURATION is DURATION range 0.0 .. 86_400.0;
  9966.        function CLOCK return TIME;
  9967.        function YEAR   (DATE : TIME) return YEAR_NUMBER;
  9968.        function MONTH  (DATE : TIME) return MONTH_NUMBER;
  9969.        function DAY    (DATE : TIME) return DAY_NUMBER;
  9970.        function SECONDS(DATE : TIME) return DAY_DURATION;
  9971.        procedure SPLIT (DATE    : in  TIME;
  9972.                         YEAR    : out YEAR_NUMBER;
  9973.                         MONTH   : out MONTH_NUMBER;
  9974.                         DAY     : out DAY_NUMBER;
  9975.                         SECONDS : out DAY_DURATION);
  9976.        function TIME_OF(YEAR    : YEAR_NUMBER;
  9977.                         MONTH   : MONTH_NUMBER;
  9978.                         DAY     : DAY_NUMBER;
  9979.                         SECONDS : DAY_DURATION := 0.0) return TIME;
  9980.        function "+"  (LEFT : TIME;     RIGHT : DURATION) return TIME;
  9981.        function "+"  (LEFT : DURATION; RIGHT : TIME)     return TIME;
  9982.        function "-"  (LEFT : TIME;     RIGHT : DURATION) return TIME;
  9983.        function "-"  (LEFT : TIME;     RIGHT : TIME)     return DURATION;
  9984.        function "<"  (LEFT, RIGHT : TIME) return BOOLEAN;
  9985.        function "<=" (LEFT, RIGHT : TIME) return BOOLEAN;
  9986.        function ">"  (LEFT, RIGHT : TIME) return BOOLEAN;
  9987.        function ">=" (LEFT, RIGHT : TIME) return BOOLEAN;
  9988.        TIME_ERROR : exception;  --  can be raised by TIME_OF, "+", and "-"
  9989.     private
  9990.        -- implementation-dependent
  9991.     end;
  9992. \uExamples:\n
  9993.     delay 3.0;  --  delay 3.0 seconds
  9994.     declare
  9995.        use CALENDAR;
  9996.        --  INTERVAL is a global constant of type DURATION
  9997.        NEXT_TIME : TIME := CLOCK + INTERVAL;
  9998.     begin
  9999.        loop
  10000.           delay NEXT_TIME - CLOCK;
  10001.           --  some actions
  10002.           NEXT_TIME := NEXT_TIME + INTERVAL;
  10003.        end loop;
  10004.     end;
  10005. \uNotes:\n
  10006. The second example causes the loop to be repeated every INTERVAL seconds on
  10007. average.    This   interval  between  two  successive  iterations  is  only
  10008. approximate.  However, there will be no cumulative drift  as  long  as  the
  10009. duration of each iteration is (sufficiently) less than INTERVAL.
  10010. 9.7  \uSelect Statements\n
  10011. There  are three forms of select statements.  One form provides a \vselective\v908.
  10012. \vwait\v908. for one or more alternatives.  The other two provide  conditional  and
  10013. timed entry calls.
  10014.     select_statement ::= selective_wait
  10015.        | \vconditional_entry_call\v909. | \vtimed_entry_call\v910.
  10016. More details:
  10017.  9.7.1   \vSelective Waits\v908.
  10018.  9.7.2   \vConditional Entry Calls\v909.
  10019.  9.7.3   \vTimed Entry Calls\v910.
  10020. 9.7.1  \uSelective Waits\n
  10021. This form of the \vselect statement\v907. allows a combination of waiting for,  and
  10022. selecting  from,  one  or  more  alternatives.  The selection can depend on
  10023. \vconditions\v504. associated with each alternative of the selective wait.
  10024.     selective_wait ::=
  10025.         select
  10026.           select_alternative
  10027.        {or
  10028.           select_alternative}
  10029.        [else
  10030.           \vsequence_of_statements\v501.]
  10031.         end select;
  10032.     select_alternative ::=
  10033.        [when condition =>]
  10034.           selective_wait_alternative
  10035.     selective_wait_alternative ::= accept_alternative
  10036.        | delay_alternative | terminate_alternative
  10037.     accept_alternative ::= accept_statement [sequence_of_statements]
  10038.     delay_alternative  ::= \vdelay_statement\v906.  [sequence_of_statements]
  10039.     terminate_alternative ::= terminate;
  10040. A selective wait must contain at least one accept alternative.  In addition
  10041. a selective wait can contain either a terminate alternative (only one),  or
  10042. one or more delay alternatives, or an else part;  these three possibilities
  10043. are mutually exclusive.
  10044. A  select alternative is said to be open if it does not start with when and
  10045. a condition, or if the  condition  is  TRUE.   It  is  said  to  be  closed
  10046. otherwise.
  10047. For  the execution of a selective wait, any conditions specified after when
  10048. are evaluated in some order that is not  defined  by  the  language;   open
  10049. alternatives are thus determined.  For an open delay alternative, the \vdelay\v906.
  10050. \vexpression\v906.  is  also  evaluated.  Similarly, for an open accept alternative
  10051. for an \ventry\v905. of a family, the \ventry index\v905. is also evaluated.  Selection and
  10052. execution of one open alternative, or of the else part, then completes  the
  10053. execution  of  the  selective  wait;   the  rules  for  this  selection are
  10054. described below.
  10055. Open accept alternatives are  first  considered.   Selection  of  one  such
  10056. alternative  takes  place  immediately  if  a  corresponding  \vrendezvous\v905. is
  10057. possible, that is, if there is a corresponding \ventry call\v905. issued by another
  10058. \vtask\v900. and waiting to be accepted.   If  several  alternatives  can  thus  be
  10059. selected,  one  of them is selected arbitrarily (that is, the language does
  10060. not  define  which  one).   When  such  an  alternative  is  selected,  the
  10061. corresponding  \vaccept  statement\v905.  and  possible  subsequent  statements are
  10062. executed.  If no rendezvous is immediately possible and there  is  no  else
  10063. part,  the  task  waits  until  an  open  selective wait alternative can be
  10064. selected.
  10065. Selection of the other forms of alternative or of an else part is performed
  10066. as follows:
  10067.   -  An open delay alternative will be selected if  no  accept  alternative
  10068.      can  be  selected before the specified delay has elapsed (immediately,
  10069.      for a negative or zero delay in the absence of  \vqueued  entry  calls\v905.);
  10070.      any  subsequent  statements  of the alternative are then executed.  If
  10071.      several delay alternatives can thus be selected (that is, if they have
  10072.      the same delay), one of them is selected arbitrarily.
  10073.   -  The else part is selected and its statements are executed if no accept
  10074.      alternative  can  be  immediately  selected,  in  particular,  if  all
  10075.      alternatives are closed.
  10076.   -  An open terminate alternative is selected if the conditions stated  in
  10077.      section  9.4 are satisfied.  It is a consequence of other rules that a
  10078.      terminate alternative cannot be selected while there is a queued entry
  10079.      call for any entry of the task.
  10080. The \vexception PROGRAM_ERROR\v1101. is raised if all alternatives  are  closed  and
  10081. there is no else part.
  10082. Examples of a select statement:
  10083.     select
  10084.        \uaccept\n DRIVER_AWAKE_SIGNAL;
  10085.     or
  10086.        delay 30.0*SECONDS;
  10087.        STOP_THE_TRAIN;
  10088.     end select;
  10089. Example of a task body with a select statement:
  10090.     task body RESOURCE is
  10091.        BUSY : BOOLEAN := FALSE;
  10092.     begin
  10093.        loop
  10094.           select
  10095.              when not BUSY =>
  10096.                 \uaccept\n SEIZE do
  10097.                    BUSY := TRUE;
  10098.                 end;
  10099.           or
  10100.              \uaccept\n RELEASE do
  10101.                 BUSY := FALSE;
  10102.              end;
  10103.           or
  10104.              terminate;
  10105.           end select;
  10106.        end loop;
  10107.     end RESOURCE;
  10108. \uNotes:\n
  10109. A  selective  wait  is  allowed to have several open delay alternatives.  A
  10110. selective wait is allowed to have several open accept alternatives for  the
  10111. same entry.
  10112. 9.7.2  \uConditional Entry Calls\n
  10113. A conditional entry call issues an entry call that is then  canceled  if  a
  10114. \vrendezvous\v905. is not immediately possible.
  10115.     conditional_entry_call ::=
  10116.        select
  10117.            \ventry_call_statement\v905.
  10118.           [sequence_of_statements]
  10119.        else
  10120.            sequence_of_statements
  10121.        end select;
  10122. For  the  execution  of  a  conditional entry call, the entry name is first
  10123. evaluated.  This  is  followed  by  any  \vevaluations\v411.  required  for  actual
  10124. parameters as in the case of a subprogram call (see 6.4).
  10125. The  entry  call  is  canceled  if the execution of the called \vtask\v900. has not
  10126. reached a point where it is ready to accept the call (that  is,  either  an
  10127. \vaccept statement\v905. for the corresponding entry, or a \vselect statement\v907. with an
  10128. open  accept alternative for the entry), or if there are prior \vqueued entry\v905.
  10129. \vcalls\v905. for this entry.  If the called task has reached a  select  statement,
  10130. the  entry  call is canceled if an accept alternative for this entry is not
  10131. selected.
  10132. If the entry call  is  canceled,  the  statements  of  the  else  part  are
  10133. executed.   Otherwise,  the  rendezvous  takes  place;   and  the  optional
  10134. \vsequence of statements\v501. after the entry call is then executed.
  10135. The  execution  of  a  conditional  entry   call   raises   the   \vexception\v1101.
  10136. \vTASKING_ERROR\v1101.  if  the called task has already completed its execution (see
  10137. also 9.10 for the case when the called \vtask becomes abnormal\v913.).
  10138. Example:
  10139.     procedure SPIN(R : RESOURCE) is
  10140.     begin
  10141.        loop
  10142.           select
  10143.              R.SEIZE;
  10144.              return;
  10145.           else
  10146.              \unull\n;  --  busy waiting
  10147.           end select;
  10148.        end loop;
  10149.     end;
  10150. 9.7.3  \uTimed Entry Calls\n
  10151. A timed entry call issues an entry call that is canceled if a \vrendezvous\v905. is
  10152. not started within a given delay.
  10153.     timed_entry_call ::=
  10154.        select
  10155.            \ventry_call_statement\v905.
  10156.           [sequence_of_statements]
  10157.        or
  10158.            delay_alternative
  10159.        end select;
  10160. For the execution of a timed entry call, the entry name is first evaluated.
  10161. This is followed by any \vevaluations\v411. required for \vactual  parameters\v606.  as  in
  10162. the  case of a subprogram call (see 6.4).  The \vexpression\v410. stating the delay
  10163. is then evaluated, and the entry call is finally issued.
  10164. If  a  rendezvous  can  be  started  within  the  specified  \vduration\v906.   (or
  10165. immediately,  as  for  a  \vconditional  entry  call\v909.,  for a negative or zero
  10166. delay), it is performed and the optional \vsequence of statements\v501.  after  the
  10167. entry  call  is  then executed.  Otherwise, the entry call is canceled when
  10168. the specified duration has expired, and the optional sequence of statements
  10169. of the delay alternative is executed.
  10170. The execution of a timed entry call raises the \vexception  TASKING_ERROR\v1101.  if
  10171. the called \vtask completes\v904. its execution before accepting the call (see also
  10172. 9.10 for the case when the called \vtask becomes abnormal\v913.).
  10173. Example:
  10174.     select
  10175.        CONTROLLER.REQUEST(MEDIUM)(SOME_ITEM);
  10176.     or
  10177.        delay 45.0;
  10178.        --  controller too busy, try something else
  10179.     end select;
  10180. 9.8  \uPriorities\n
  10181. Each  \vtask\v900.  may  (but  need  not)  have a priority, which is a value of the
  10182. \vsubtype\v305. PRIORITY (of the \vtype INTEGER\v314.) declared in the  predefined  library
  10183. \vpackage  SYSTEM\v1308..   A  lower  value indicates a lower degree of
  10184. urgency;  the range of priorities is implementation-defined.  A priority is
  10185. associated with a task if a \vpragma\v210.
  10186.     pragma PRIORITY (\vstatic_expression\v422.);
  10187. appears in the corresponding \vtask specification\v901.;  the priority is given  by
  10188. the  value  of  the  expression.   A  priority  is associated with the \vmain\v1001.
  10189. \vprogram\v1001. if such a pragma appears in its  outermost  \vdeclarative  part\v333..   At
  10190. most  one such pragma can appear within a given task specification or for a
  10191. subprogram that is a library unit, and these are the  only  allowed  places
  10192. for  this  pragma.   A  pragma  PRIORITY  has  no  effect if it occurs in a
  10193. subprogram other than the main program.
  10194. The specification of a priority  is  an  indication  given  to  assist  the
  10195. implementation  in the allocation of processing resources to parallel tasks
  10196. when there are more tasks eligible for  execution  than  can  be  supported
  10197. simultaneously  by  the  available  processing  resources.   The  effect of
  10198. priorities on scheduling is defined by the following rule:
  10199.      If two tasks with different priorities are both eligible for execution
  10200.      and could sensibly be executed using the same physical processors  and
  10201.      the  same  other processing resources, then it cannot be the case that
  10202.      the task with the lower priority is executing while the task with  the
  10203.      higher priority is not.
  10204. For  tasks of the same priority, the scheduling order is not defined by the
  10205. language.  For tasks without explicit priority, the  scheduling  rules  are
  10206. not  defined,  except  when such tasks are engaged in a \vrendezvous\v905..  If the
  10207. priorities  of  both  tasks  engaged  in  a  rendezvous  are  defined,  the
  10208. rendezvous  is executed with the higher of the two priorities.  If only one
  10209. of the two priorities is defined, the rendezvous is executed with at  least
  10210. that  priority.   If  neither is defined, the priority of the rendezvous is
  10211. undefined.
  10212. \uNotes:\n
  10213. The priority of a  task  is  static  and  therefore  fixed.   However,  the
  10214. priority  during  a  rendezvous  is  not  necessarily  static since it also
  10215. depends on the priority of the task calling the entry.   Priorities  should
  10216. be  used  only to indicate relative degrees of urgency;  they should not be
  10217. used for task synchronization.
  10218. 9.9  \uTask and Entry Attributes\n
  10219. For a \vtask object\v902. or value T the following \vattributes\v405. are defined:
  10220. T'CALLABLE    Yields the  value  \vFALSE\v313.  when  the  execution  of  the  \vtask\v900.
  10221.               designated  by  T  is either \vcompleted\v904. or \vterminated\v904., or when
  10222.               the \vtask is abnormal\v913..  Yields the value \vTRUE\v313. otherwise.   The
  10223.               value of this attribute is of the predefined \vtype BOOLEAN\v313..
  10224. T'TERMINATED  Yields the  value  TRUE  if  the  task  \vdesignated\v901.  by  T  is
  10225.               terminated.   Yields the value FALSE otherwise.  The value of
  10226.               this attribute is of the predefined type BOOLEAN.
  10227. In addition, the representation attributes STORAGE_SIZE, SIZE, and  ADDRESS
  10228. are defined for a task object T or a \vtask type\v901. T (see 13.7.2).
  10229. The  attribute COUNT is defined for an \ventry\v905. E of a task unit T.  The entry
  10230. can be either a single entry or an entry of a family (in  either  case  the
  10231. name  of  the  single  entry  or  entry family can be either a simple or an
  10232. expanded name).  This attribute is only allowed within the body of  T,  but
  10233. excluding  within any program unit that is, itself, inner to the body of T.
  10234. E'COUNT       Yields the number of entry  calls  presently  \vqueued\v905.  on  the
  10235.               entry E (if the attribute is evaluated by the execution of an
  10236.               \vaccept  statement\v905. for the entry E, the count does not include
  10237.               the calling task).  The value of this  attribute  is  of  the
  10238.               \vtype universal_integer\v314..
  10239. Note:
  10240. Algorithms  interrogating  the attribute E'COUNT should take precautions to
  10241. allow for the increase of the value of this attribute  for  incoming  entry
  10242. calls, and its decrease, for example with \vtimed entry calls\v910..
  10243. 9.10  \uAbort Statements\n
  10244. An  abort  statement  causes  one  or  more  \vtasks\v900. to become abnormal, thus
  10245. preventing any further \vrendezvous\v905. with such tasks.
  10246.     abort_statement ::= \uabort\n task_name {, task_name};
  10247. The determination of the type of each task name uses the fact that the type
  10248. of the \vname\v401. is a task type.
  10249. For the execution of an abort \vstatement\v500., the given task names are \vevaluated\v401.
  10250. in some order that is not defined by the language.  Each  named  task  then
  10251. becomes abnormal unless it is already \vterminated\v904.;  similarly, any task that
  10252. depends  on  a named task becomes abnormal unless it is already terminated.
  10253. Any abnormal task whose execution is suspended at an  \vaccept  statement\v905.,  a
  10254. \vselect  statement\v907.,  or  a  \vdelay statement\v906. becomes completed;  any abnormal
  10255. task whose execution is suspended at an entry call, and that is not yet  in
  10256. a corresponding rendezvous, becomes completed and is removed from the entry
  10257. \vqueue\v905.;   any  abnormal task that has not yet started its \vactivation\v903. becomes
  10258. completed (and hence also terminated).  This completes the execution of the
  10259. abort statement.
  10260. The completion of any other abnormal task need not happen before completion
  10261. of the abort statement.  It must happen no later  than  when  the  abnormal
  10262. task  reaches a synchronization point that is one of the following: the end
  10263. of its activation;  a point where it causes the activation of another task;
  10264. an entry call; the start or the end  of  an  accept  statement;   a  select
  10265. statement;   a  delay  statement;   an  \vexception  handler\v1102.;   or  an  abort
  10266. statement.  If a task that calls an  entry  becomes  \vabnormal  while  in  a\v1107.
  10267. \vrendezvous\v1107.,  its  termination  does not take place before the completion of
  10268. the rendezvous (see 11.5).
  10269. The call of an entry of an abnormal task raises the \vexception TASKING_ERROR\v1101.
  10270. at the place of the call.  Similarly, the exception TASKING_ERROR is raised
  10271. for any task that has called an entry of an abnormal  task,  if  the  entry
  10272. call  is still queued or if the rendezvous is not yet finished (whether the
  10273. entry call is an \ventry call statement\v905., or  a  \vconditional\v909.  or  \vtimed  entry\v910.
  10274. \vcall\v910.);   the  exception  is  raised  no  later  than  the completion of the
  10275. abnormal task.  The value of the \vattribute CALLABLE\v912. is \vFALSE\v313. for  any  task
  10276. that is abnormal (or completed).
  10277. If  the  abnormal completion of a task takes place while the task updates a
  10278. variable, then the value of this variable is undefined.  Example:
  10279.     \uabort\n USER, TERMINAL.\uall\n, POOL(3);
  10280. \uNotes:\n
  10281. An abort statement should be  used  only  in  extremely  severe  situations
  10282. requiring  unconditional termination.  A task is allowed to abort any task,
  10283. including itself.
  10284. 9.11  \uShared Variables\n
  10285. The normal means of communicating values between tasks is  by  \ventry  calls\v905.
  10286. and \vaccept statements\v905..
  10287. If  two  \vtasks\v900.  read  or  update  a  shared  \vvariable\v303.  (that is, a variable
  10288. accessible by both), then neither of them may  assume  anything  about  the
  10289. order  in  which  the  other  performs its operations, except at the points
  10290. where they synchronize.  Two tasks are synchronized at the start and at the
  10291. end of their \vrendezvous\v905..  At the start and at the end of its \vactivation\v903.,  a
  10292. task  is  synchronized  with  the task that causes this activation.  A task
  10293. that has completed its execution is synchronized with any other task.
  10294. For the actions performed by a program  that  uses  shared  variables,  the
  10295. following assumptions can always be made:
  10296.   -  If between two synchronization points of a task,  this  task  reads  a
  10297.      shared  variable  whose  \vtype\v305.  is  a  scalar  or access type, then the
  10298.      variable is not updated by any other task at any  time  between  these
  10299.      two points.
  10300.   -  If between two synchronization points of a task, this task  updates  a
  10301.      shared  variable  whose  type  is  a  scalar  or access type, then the
  10302.      variable is neither read nor updated by any other  task  at  any  time
  10303.      between these two points.
  10304. The  execution  of  the program is \verroneous\v108. if any of these assumptions is
  10305. violated.
  10306. If a given task \vreads the value\v602. of a shared variable, the above assumptions
  10307. allow an implementation to maintain local copies of the value (for example,
  10308. in registers or in some other form of temporary storage);  and for as  long
  10309. as  the  given task neither reaches a synchronization point nor \vupdates the\v602.
  10310. \vvalue\v602. of the shared variable, the above assumptions  imply  that,  for  the
  10311. given  task,  reading  a  local  copy  is  equivalent to reading the shared
  10312. variable itself.
  10313. Similarly, if a given task updates the value  of  a  shared  variable,  the
  10314. above  assumptions  allow an implementation to maintain a local copy of the
  10315. value, and to defer the effective store of the local copy into  the  shared
  10316. variable until a synchronization point, provided that every further read or
  10317. update  of the variable by the given task is treated as a read or update of
  10318. the local copy.  On the other hand, an implementation  is  not  allowed  to
  10319. introduce  a  store,  unless  this  store  would  also  be  executed in the
  10320. \vcanonical order\v1108..
  10321. The \vpragma\v210. SHARED can be used to specify that every read  or  update  of  a
  10322. variable  is a synchronization point for that variable;  that is, the above
  10323. assumptions always hold for the given variable  (but  not  necessarily  for
  10324. other variables).  The form of this pragma is as follows:
  10325.     pragma SHARED(variable_simple_name);
  10326. This  pragma  is  allowed  only  for  a  variable  declared  by  an  object
  10327. declaration and whose type is  a  scalar  or  access  type;   the  variable
  10328. declaration  and  the  pragma  must  both occur (in this order) immediately
  10329. within the same \vdeclarative part\v333. or \vpackage specification\v701.;  the pragma must
  10330. appear before any occurrence of the name of the variable, other than in  an
  10331. address clause.
  10332. An  implementation must restrict the objects for which the pragma SHARED is
  10333. allowed to objects for which each of direct reading and direct updating  is
  10334. implemented as an indivisible operation.
  10335. 9.12  \uExample of Tasking\n
  10336. The following example defines a buffering task to smooth variations between
  10337. the  speed  of  output  of  a producing task and the speed of input of some
  10338. consuming  task.   For  instance,  the  producing  task  may  contain   the
  10339. statements
  10340.     loop
  10341.        --  produce the next character CHAR
  10342.        BUFFER.WRITE(CHAR);
  10343.        exit when CHAR = ASCII.EOT;
  10344.     end loop;
  10345. and the consuming task may contain the statements
  10346.     loop
  10347.        BUFFER.READ(CHAR);
  10348.        --  consume the character CHAR
  10349.        exit when CHAR = ASCII.EOT;
  10350.     end loop;
  10351. The  buffering  task contains an internal pool of characters processed in a
  10352. round-robin fashion.  The pool has two indices, an  IN_INDEX  denoting  the
  10353. space  for the next input character and an OUT_INDEX denoting the space for
  10354. the next output character.
  10355.     task BUFFER is
  10356.        entry READ (C : out CHARACTER);
  10357.        entry WRITE(C : in  CHARACTER);
  10358.     end;
  10359.     task body BUFFER is
  10360.        POOL_SIZE : constant INTEGER := 100;
  10361.        POOL      : \uarray\n(1 .. POOL_SIZE) of CHARACTER;
  10362.        COUNT     : INTEGER range 0 .. POOL_SIZE := 0;
  10363.        IN_INDEX, OUT_INDEX : INTEGER range 1 .. POOL_SIZE := 1;
  10364.     begin
  10365.        loop
  10366.           select
  10367.              when COUNT < POOL_SIZE =>
  10368.                 \uaccept\n WRITE(C : in CHARACTER) do
  10369.                    POOL(IN_INDEX) := C;
  10370.                 end;
  10371.                 IN_INDEX := IN_INDEX mod POOL_SIZE + 1;
  10372.                 COUNT    := COUNT + 1;
  10373.           or when COUNT > 0 =>
  10374.                 \uaccept\n READ(C : out CHARACTER) do
  10375.                    C := POOL(OUT_INDEX);
  10376.                 end;
  10377.                 OUT_INDEX := OUT_INDEX mod POOL_SIZE + 1;
  10378.                 COUNT     := COUNT - 1;
  10379.           or
  10380.              terminate;
  10381.           end select;
  10382.        end loop;
  10383.     end BUFFER;
  10384. :1000
  10385. 10. \uProgram Structure and Compilation Issues\n
  10386. The   overall  structure  of  programs  and  the  facilities  for  separate
  10387. \vcompilation\v1001. are described in this chapter.  A program is  a  collection  of
  10388. one  or  more  \vcompilation  units\v1001.  submitted  to  a compiler in one or more
  10389. compilations.  Each compilation unit specifies the separate compilation  of
  10390. a  construct  which  can  be  a  \vsubprogram  declaration\v601. or \vbody\v603., a \vpackage\v701.
  10391. \vdeclaration  or  body\701.,  a  \vgeneric  declaration\v1201.  or  \vbody\v1205.,  or  a   \vgeneric\v1206.
  10392. \vinstantiation\v1206..   Alternatively  this  construct  can be a \vsubunit\v1004., in which
  10393. case it includes the body of a subprogram, package, \vtask unit\v900.,  or  generic
  10394. unit declared within another compilation unit.
  10395. More details:
  10396.  10.1    \vCompilation Units - Library Units\v1001.
  10397.  10.2    \vSubunits of Compilation Units\v1004.
  10398.  10.3    \vOrder of Compilation\v1006.
  10399.  10.4    \vThe Program Library\v1007.
  10400.  10.5    \vElaboration of Library Units\v1008.
  10401.  10.6    \vProgram Optimization\v1009.
  10402. :1001
  10403. 10.1  \uCompilation Units - Library Units\n
  10404. The text of a program can be submitted to  the  compiler  in  one  or  more
  10405. compilations.  Each compilation is a succession of compilation units.
  10406.     compilation ::= {compilation_unit}
  10407.     compilation_unit ::=
  10408.          \vcontext_clause\v1002. \vlibrary_unit\v1008. | context_clause secondary_unit
  10409.     library_unit ::=
  10410.          subprogram_declaration | \vpackage_declaration\v701.
  10411.        | \vgeneric_declaration\v1201.    | \vgeneric_instantiation\v1206.
  10412.        | subprogram_body
  10413.     secondary_unit ::= library_unit_body | \vsubunit\v1004.
  10414.     library_unit_body ::= subprogram_body | \vpackage_body\v701.
  10415. The compilation units of a program are said to belong to a program library.
  10416. A  compilation  unit  defines either a library unit or a secondary unit.  A
  10417. secondary unit is either the separately compiled \vproper body\v333. of  a  library
  10418. unit,  or  a  subunit  of  another  compilation  unit.  The \vdesignator\v601. of a
  10419. separately compiled \vsubprogram\v600. (whether a library unit or a  subunit)  \vmust\v108.
  10420. be an \videntifier\v203..  Within a program library the simple \vnames\v401. of all library
  10421. units must be distinct identifiers.
  10422. The effect of compiling a library unit is to define (or redefine) this unit
  10423. as one that belongs to the program library.  For the \vvisibility\v803. rules, each
  10424. library  unit  acts  as  a  \vdeclaration\v301.  that \voccurs immediately within\v801. the
  10425. \vpackage STANDARD\v806..
  10426. The effect of compiling a secondary unit is to define the body of a library
  10427. unit, or in the case of a subunit, to define the proper body of  a  \vprogram\v600.
  10428. \vunit\v600. that is declared within another compilation unit.
  10429. A \vsubprogram body\v603. given in a compilation unit is interpreted as a secondary
  10430. unit  if  the  program  library  already  contains a library unit that is a
  10431. subprogram with the same name;  it  is  otherwise  interpreted  both  as  a
  10432. library  unit  and  as  the  corresponding library unit body (that is, as a
  10433. secondary unit).
  10434. The compilation units of a compilation are compiled in the given order.   A
  10435. \vpragma\v210.  that  applies  to the whole of a compilation must appear before the
  10436. first compilation unit of that compilation.
  10437. A subprogram that is a library unit can be used as a main  program  in  the
  10438. usual sense.  Each main program acts as if called by some \venvironment\v1007. \vtask\v900.;
  10439. the  means  by  which this execution is initiated are not prescribed by the
  10440. language definition.  An implementation may impose certain requirements  on
  10441. the  parameters  and  on  the  result,  if  any,  of  a main program (these
  10442. requirements  must  be  stated  in  Appendix  F).   In  any   case,   every
  10443. implementation  is  required  to  \vallow\v108.,  at  least, main programs that are
  10444. parameterless \vprocedures\v601., and every main program must be a subprogram  that
  10445. is a library unit.
  10446. \uNotes:\n
  10447. A  simple  program may consist of a single compilation unit.  A compilation
  10448. need not have any compilation units;  for example, its text can consist  of
  10449. pragmas.
  10450. The  designator  of  a library function cannot be an \voperator symbol\v601., but a
  10451. \vrenaming declaration\v805.  is  allowed  to  rename  a  library  function  as  an
  10452. \voperator\v411..   Two  library  subprograms  must  have distinct simple names and
  10453. hence cannot overload  each  other.   However,  renaming  declarations  are
  10454. allowed  to  define  overloaded  names  for such subprograms, and a locally
  10455. declared subprogram is allowed  to  overload  a  library  subprogram.   The
  10456. expanded  name STANDARD.L can be used for a library unit L (unless the name
  10457. STANDARD is hidden) since library units  act  as  declarations  that  occur
  10458. immediately within the package STANDARD.
  10459. More details:
  10460.  10.1.1  \vContext Clauses - With Clauses\v1002.
  10461.  10.1.2  \vExamples of Compilation Units\v1003.
  10462. :1002
  10463. 10.1.1  \uContext Clauses - With Clauses\n
  10464. A context clause is used to specify  the  \vlibrary  units\v1001.  whose  \vnames\v401.  are
  10465. needed within a \vcompilation unit\v1001..
  10466.     context_clause ::= {with_clause {use_clause}}
  10467.     with_clause ::= with unit_simple_name {, unit_simple_name};
  10468. The  names  that  appear  in  a  context clause \vmust\v108. be the \vsimple names\v401. of
  10469. library units.  The simple name of any library unit  is  \vallowed\v108.  within  a
  10470. with  clause.   The  only names allowed in a \vuse clause\v804. of a context clause
  10471. are the simple names of library \vpackages\v700. mentioned by previous with clauses
  10472. of the context clause.  A simple name declared by a renaming declaration is
  10473. not allowed in a context clause.
  10474. The with clauses and use clauses of the context clause of  a  library  unit
  10475. apply  to this library unit and also to the \vsecondary unit\v1001. that defines the
  10476. corresponding body (whether such a clause  is  repeated  or  not  for  this
  10477. unit).   Similarly,  the with clauses and use clauses of the context clause
  10478. of a compilation unit apply to this unit and also to its \vsubunits\v1004., if  any.
  10479. If  a  library unit is named by a with clause that applies to a compilation
  10480. unit, then this library unit is directly  visible  within  the  compilation
  10481. unit,  except  where  hidden;   the  library unit is visible as if declared
  10482. immediately within the \vpackage STANDARD\v806..
  10483. Dependences among compilation units are defined by with clauses;  that  is,
  10484. a  compilation  unit  that mentions other library units in its with clauses
  10485. depends on those library units.  These dependences between units are  taken
  10486. into account for the determination of the allowed order of compilation (and
  10487. recompilation)  of compilation units, as explained in section 10.3, and for
  10488. the determination of the allowed order of \velaboration\v333. of compilation units,
  10489. as explained in section 10.5.
  10490. \uNotes:\n
  10491. A library unit named by a with clause of  a  compilation  unit  is  visible
  10492. (except  where hidden) within the compilation unit and hence can be used as
  10493. a corresponding \vprogram unit\v600..  Thus within the compilation unit,  the  name
  10494. of  a  library  package can be given in use clauses and can be used to form
  10495. expanded names;  a library subprogram can be called;  and  \vinstances\v1206.  of  a
  10496. library \vgeneric unit\v1201. can be declared.
  10497. The  rules given for with clauses are such that the same effect is obtained
  10498. whether the name of a library unit is mentioned once or more than  once  by
  10499. the applicable with clauses, or even within a given with clause.
  10500. Example 1 : A \vmain program\v1001.:
  10501. The  following  is  an  example  of  a  main program consisting of a single
  10502. compilation unit:  a \vprocedure\v601. for printing the real roots of  a  quadratic
  10503. equation.   The  predefined  package  TEXT_IO  and  a  user-defined package
  10504. REAL_OPERATIONS (containing the definition of the  \vtype\v305.  REAL  and  of  the
  10505. packages  REAL_IO  and REAL_FUNCTIONS) are assumed to be already present in
  10506. the program library.  Such packages may be used by other main programs.
  10507.     with TEXT_IO, REAL_OPERATIONS; use REAL_OPERATIONS;
  10508.     procedure QUADRATIC_EQUATION is
  10509.        A, B, C, D : REAL;
  10510.        use REAL_IO,         --  achieves \vdirect visibility\v803. of GET and PUT
  10511.                                 for REAL
  10512.            TEXT_IO,         --  achieves direct visibility of PUT for strings
  10513.                                 and of NEW_LINE
  10514.            REAL_FUNCTIONS;  --  achieves direct visibility of SQRT
  10515.     begin
  10516.        GET(A); GET(B); GET(C);
  10517.        D := B**2 - 4.0*A*C;
  10518.        if D < 0.0 then
  10519.           PUT("Imaginary Roots.");
  10520.        else
  10521.           PUT("Real Roots : X1 = ");
  10522.           PUT((-B - SQRT(D))/(2.0*A)); PUT(" X2 = ");
  10523.           PUT((-B + SQRT(D))/(2.0*A));
  10524.        end if;
  10525.        NEW_LINE;
  10526.     end QUADRATIC_EQUATION;
  10527. Notes on the example:
  10528. The with clauses of a compilation unit need only mention the names of those
  10529. library subprograms and packages whose  \vvisibility\v803.  is  actually  necessary
  10530. within  the  unit.   They  need  not (and should not) mention other library
  10531. units that are used in turn by some of the units named in the with clauses,
  10532. unless these other library units are also  used  directly  by  the  current
  10533. compilation unit.  For example, the body of the package REAL_OPERATIONS may
  10534. need elementary operations provided by other packages.  The latter packages
  10535. should  not  be  named by the with clause of QUADRATIC_EQUATION since these
  10536. elementary operations are not directly called within its body.
  10537. :1003
  10538. 10.1.2  \uExamples of Compilation Units\n
  10539. A  \vcompilation  unit\v1001.  can be split into a number of compilation units.  For
  10540. example, consider the following \vprogram\v1000..
  10541.     procedure PROCESSOR is
  10542.        SMALL : constant := 20;
  10543.        TOTAL : INTEGER  := 0;
  10544.        package STOCK is
  10545.           LIMIT : constant := 1
  10546.           TABLE : \uarray\n (1 .. LIMIT) of INTEGER;
  10547.           procedure RESTART;
  10548.        end STOCK;
  10549.        \vpackage body\v701. STOCK is
  10550.           procedure RESTART is
  10551.           begin
  10552.              for N in 1 .. LIMIT loop
  10553.                 TABLE(N) := N;
  10554.              end loop;
  10555.           end;
  10556.        begin
  10557.           RESTART;
  10558.        end STOCK;
  10559.        procedure UPDATE(X : INTEGER) is
  10560.           use STOCK;
  10561.        begin
  10562.           ...
  10563.           TABLE(X) := TABLE(X) + SMALL;
  10564.           ...
  10565.        end UPDATE;
  10566.     begin
  10567.        ...
  10568.        STOCK.RESTART;  -- reinitializes TABLE
  10569.        ...
  10570.     end PROCESSOR;
  10571. The following three compilation units  define  a  program  with  an  effect
  10572. equivalent to the above example (the broken lines between compilation units
  10573. serve  to remind the reader that these units need not be contiguous texts).
  10574. Example 2 : Several compilation units:
  10575.     package STOCK is
  10576.        LIMIT : constant := 1
  10577.        TABLE : \uarray\n (1 .. LIMIT) of INTEGER;
  10578.        procedure RESTART;
  10579.     end STOCK;
  10580.     -------------------------------------------------
  10581.     package body STOCK is
  10582.        procedure RESTART is
  10583.        begin
  10584.           for N in 1 .. LIMIT loop
  10585.              TABLE(N) := N;
  10586.           end loop;
  10587.        end;
  10588.     begin
  10589.        RESTART;
  10590.     end STOCK;
  10591.     -------------------------------------------------
  10592.     with STOCK;
  10593.     procedure PROCESSOR is
  10594.        SMALL : constant := 20;
  10595.        TOTAL : INTEGER  := 0;
  10596.        procedure UPDATE(X : INTEGER) is
  10597.           use STOCK;
  10598.        begin
  10599.           ...
  10600.           TABLE(X) := TABLE(X) + SMALL;
  10601.           ...
  10602.        end UPDATE;
  10603.     begin
  10604.        ...
  10605.        STOCK.RESTART;  --  reinitializes TABLE
  10606.        ...
  10607.     end PROCESSOR;
  10608. Note that in the latter version, the \vpackage\v700. STOCK  has  no  \vvisibility\v803.  of
  10609. outer  \videntifiers\v203.  other  than  the predefined identifiers (of the package
  10610. STANDARD).  In particular, STOCK does not use any  identifier  declared  in
  10611. PROCESSOR  such  as  SMALL  or  TOTAL;  otherwise STOCK could not have been
  10612. extracted from PROCESSOR in the above manner.  The procedure PROCESSOR,  on
  10613. the  other  hand,  depends  on  STOCK  and  mentions this package in a \vwith\v1002.
  10614. \vclause\v1002..  This permits the inner occurrences of STOCK in the  expanded  name
  10615. STOCK.RESTART and in the \vuse clause\v804..
  10616. These three compilation units can be submitted in one or more compilations.
  10617. For  example,  it  is  possible to submit the \vpackage specification\v701. and the
  10618. package body together and in this order in a single compilation.
  10619. :1004
  10620. 10.2  \uSubunits of Compilation Units\n
  10621. A subunit is used for the \vseparate compilation\v1001. of  the  proper  body  of  a
  10622. \vprogram  unit\v600.  declared  within  another  \vcompilation unit\v1001..  This method of
  10623. splitting a \vprogram\v1000. permits hierarchical program development.
  10624.     body_stub ::=
  10625.          \vsubprogram_specification\v601. is separate;
  10626.        | \vpackage body\701. package_simple_name is separate;
  10627.        | \vtask body\901. task_simple_name is separate;
  10628.     subunit ::=
  10629.          separate (parent_unit_name) proper_body
  10630. A body stub is only allowed as the body of a program unit (a subprogram,  a
  10631. \vpackage\v700.,  a  \vtask  unit\v901.,  or  a  \vgeneric  unit\v1200.)  if  the  body  stub \voccurs\v801.
  10632. \vimmediately within\v801. either the specification of a  library  package  or  the
  10633. \vdeclarative part\v333. of another compilation unit.
  10634. If the body of a program unit is a body stub, a separately compiled subunit
  10635. containing  the  corresponding  proper  body is required.  In the case of a
  10636. subprogram, the subprogram specifications given in the \vproper body\v333.  and  in
  10637. the body stub must \vconform\v604..
  10638. Each subunit mentions the \vname\v401. of its parent unit, that is, the compilation
  10639. unit  where  the corresponding body stub is given.  If the parent unit is a
  10640. \vlibrary unit\v1001., it is called the ancestor library unit.  If the  parent  unit
  10641. is  itself  a  subunit,  the  parent  unit name must be given in full as an
  10642. \vexpanded name\v404., starting with the \vsimple name\v401. of the ancestor library  unit.
  10643. The  simple  names of all subunits that have the same ancestor library unit
  10644. must be distinct \videntifiers\v203..
  10645. \vVisibility\v803. within the proper body of a subunit is the visibility that would
  10646. be obtained at the place of the corresponding body stub (within the  parent
  10647. unit)  if  the \vwith clauses\v1002. and \vuse clauses\v804. of the subunit were appended to
  10648. the \vcontext clause\v1002. of the parent unit.  If the  parent  unit  is  itself  a
  10649. subunit,  then  the  same  rule is used to define the visibility within the
  10650. proper body of the parent unit.
  10651. The effect of the \velaboration\v333. of a body stub is  to  elaborate  the  proper
  10652. body of the subunit.
  10653. \uNotes:\n
  10654. Two  subunits  of  different library units in the same program library need
  10655. not have distinct identifiers.  In any case, their full expanded names  are
  10656. distinct,  since  the  simple names of library units are distinct and since
  10657. the simple names of all subunits that have a given library unit as ancestor
  10658. unit are also distinct.  By  means  of  renaming  \vdeclarations\v301.,  overloaded
  10659. \vsubprogram\v600. names that rename (distinct) subunits can be introduced.
  10660. A  library unit that is named by the with clause of a subunit can be hidden
  10661. by a declaration (with the same identifier) given in the proper body of the
  10662. subunit.  Moreover, such a library unit can even be \vhidden by a declaration\v803.
  10663. given within a parent unit since a library unit  acts  as  if  declared  in
  10664. STANDARD;   this  however  does  not  affect the interpretation of the with
  10665. clauses themselves, since only names of library units can  appear  in  with
  10666. clauses.
  10667. More details:
  10668.  10.2.1  \vExamples of Subunits\v1005.
  10669. :1005
  10670. 10.2.1  \uExamples of Subunits\n
  10671. The  \vprocedure\v600. TOP is first written as a \vcompilation unit\v1001. without subunits.
  10672.     with TEXT_IO;
  10673.     procedure TOP is
  10674.        type REAL is digits 10;
  10675.        R, S : REAL := 1.0;
  10676.        \vpackage\v700. FACILITY is
  10677.           PI : constant := 3.14159_26536;
  10678.           function  F(X : REAL) return REAL;
  10679.           procedure G(Y, Z : REAL);
  10680.        end FACILITY;
  10681.        \vpackage body\v701. FACILITY is
  10682.           --  some \vlocal declarations\v801. followed by
  10683.           function F(X : REAL) return REAL is
  10684.           begin
  10685.              --  sequence of statements of F
  10686.              ...
  10687.           end F;
  10688.           procedure G(Y, Z : REAL) is
  10689.              --  local procedures using TEXT_IO
  10690.              ...
  10691.           begin
  10692.              --  sequence of statements of G
  10693.              ...
  10694.           end G;
  10695.        end FACILITY;
  10696.        procedure TRANSFORM(U : in out REAL) is
  10697.           use FACILITY;
  10698.        begin
  10699.           U := F(U);
  10700.           ...
  10701.        end TRANSFORM;
  10702.     begin -- TOP
  10703.        TRANSFORM(R);
  10704.        ...
  10705.        FACILITY.G(R, S);
  10706.     end TOP;
  10707. The body of the package FACILITY and that of the procedure TRANSFORM can be
  10708. made into separate subunits of TOP.  Similarly, the body of the procedure G
  10709. can be made into a subunit of FACILITY as follows.
  10710. Example 3:
  10711.     procedure TOP is
  10712.        type REAL is digits 10;
  10713.        R, S : REAL := 1.0;
  10714.        package FACILITY is
  10715.           PI : constant := 3.14159_26536;
  10716.           function  F(X : REAL) return REAL;
  10717.           procedure G(Y, Z : REAL);
  10718.        end FACILITY;
  10719.      package body FACILITY is separate;                -- stub of FACILITY
  10720.      procedure TRANSFORM(U : in out REAL) is separate; -- stub of TRANSFORM
  10721.     begin  --  TOP
  10722.        TRANSFORM(R);
  10723.        ...
  10724.        FACILITY.G(R, S);
  10725.     end TOP;
  10726.     -------------------------------------------------
  10727.     separate (TOP)
  10728.     procedure TRANSFORM(U : in out REAL) is
  10729.        use FACILITY;
  10730.     begin
  10731.        U := F(U);
  10732.        ...
  10733.     end TRANSFORM;
  10734.     -------------------------------------------------
  10735.     separate (TOP)
  10736.     package body FACILITY is
  10737.        --  some local declarations followed by
  10738.        function F(X : REAL) return REAL is
  10739.        begin
  10740.           --  sequence of statements of F
  10741.           ...
  10742.        end F;
  10743.        procedure G(Y, Z : REAL) is separate;              -- stub of G
  10744.     end FACILITY;
  10745.     -------------------------------------------------
  10746.     with TEXT_IO;
  10747.     separate (TOP.FACILITY)  --  full name of FACILITY
  10748.     procedure G(Y, Z : REAL) is
  10749.        --  local procedures using TEXT_IO
  10750.        ...
  10751.     begin
  10752.        --  sequence of statements of G
  10753.        ...
  10754.     end G;
  10755. In the above example TRANSFORM and FACILITY are subunits of TOP, and G is a
  10756. subunit of FACILITY.  The \vvisibility\v803. in the split version is the same as in
  10757. the initial version except for one change:   since  TEXT_IO  is  only  used
  10758. within  G,  the  corresponding  \vwith clause\v1002. is written for G instead of for
  10759. TOP.   Apart  from  this  change,  the  same  \videntifiers\v203.  are  visible  at
  10760. corresponding  program points in the two versions.  For example, all of the
  10761. following  are (directly) visible within the \vproper body\v333. of the subunit  G:
  10762. the  procedure  TOP,  the  \vtype\v305.  REAL,  the  \vvariables\v303. R and S, the package
  10763. FACILITY and the contained \vnamed number\v302. PI and \vsubprograms\v600. F and G.
  10764. :1006
  10765. 10.3  \uOrder of Compilation\n
  10766. The  rules  defining  the  order  in which units can be compiled are direct
  10767. consequences of the \vvisibility\v803. rules and, in particular, of the  fact  that
  10768. any  \vlibrary  unit\v1001. that is mentioned by the \vcontext clause\v1002. of a \vcompilation\v1001.
  10769. unit is visible in the \vcompilation unit\v1001..
  10770. A compilation unit must be compiled after all library units  \vnamed\v401.  by  its
  10771. context clause.  A \vsecondary unit\v1001. that is a subprogram or \vpackage body\v701. must
  10772. be  compiled after the corresponding library unit.  Any \vsubunit\v1004. of a parent
  10773. compilation unit must be compiled after the parent compilation unit.
  10774. If any error is detected while attempting to compile  a  compilation  unit,
  10775. then  the attempted compilation is rejected and it has no effect whatsoever
  10776. on the program library;  the same holds for recompilations (no  compilation
  10777. unit can become obsolete because of such a recompilation).
  10778. The  order in which the compilation units of a program are compiled must be
  10779. consistent with the partial ordering defined by the above rules.
  10780. Similar rules apply for recompilations.  A compilation unit is  potentially
  10781. affected  by  a  change in any library unit named by its context clause.  A
  10782. secondary unit is potentially affected by a  change  in  the  corresponding
  10783. library  unit.   The  subunits of a parent compilation unit are potentially
  10784. affected by a change of the parent compilation unit.  If a compilation unit
  10785. is successfully recompiled, the compilation units potentially  affected  by
  10786. this  change  are obsolete and must be recompiled unless they are no longer
  10787. needed.  An implementation may be able to reduce the compilation  costs  if
  10788. it  can deduce that some of the potentially affected units are not actually
  10789. affected by the change.
  10790. The subunits of a unit can be recompiled without affecting the unit itself.
  10791. Similarly, changes in a subprogram or \vpackage  body\v701.  do  not  affect  other
  10792. compilation  units  (apart  from  the  subunits  of  the  body) since these
  10793. compilation  units  only  have  access  to  the   subprogram   or   package
  10794. specification.  An implementation is only allowed to deviate from this rule
  10795. for  inline inclusions, for certain compiler optimizations, and for certain
  10796. implementations of generic program units, as described below.
  10797.   -  If a \vpragma INLINE\v605. is applied to a \vsubprogram declaration\v601. given  in  a
  10798.      \vpackage  specification\v701.,  inline inclusion will only be achieved if the
  10799.      package body is compiled before units calling the subprogram.  In such
  10800.      a case, inline inclusion creates a dependence of the calling  unit  on
  10801.      the  package  body,  and  the compiler  must recognize this dependence
  10802.      when deciding on the need for recompilation.  If  a  calling  unit  is
  10803.      compiled  before  the  package  body, the pragma may be ignored by the
  10804.      compiler for such calls (a  warning  that  inline  inclusion  was  not
  10805.      achieved may be issued).  Similar considerations apply to a separately
  10806.      compiled subprogram for which an INLINE pragma is specified.
  10807.   -  For optimization purposes, an implementation may compile several units
  10808.      of a given compilation in a way that creates further dependences among
  10809.      these   compilation   units.    The  compiler  must  then  take  these
  10810.      dependences into account when deciding on the need for recompilations.
  10811.   -  An implementation may require  that  a  \vgeneric  declaration\v1201.  and  the
  10812.      corresponding \vproper body\v333. be part of the same compilation, whether the
  10813.      generic  unit  is  itself  separately  compiled or is local to another
  10814.      compilation unit.  An implementation may also require that subunits of
  10815.      a \vgeneric unit\v1200. be part of the same compilation.
  10816. Examples of Compilation Order:
  10817. (a)  In example 1 (see 10.1.1):  The \vprocedure\v601. QUADRATIC_EQUATION  must  be
  10818.      compiled after the library packages TEXT_IO  and REAL_OPERATIONS since
  10819.      they appear in its \vwith clause\v1002..
  10820. (b)  In example 2 (see 10.1.2):  The package body STOCK  must  be  compiled
  10821.      after the corresponding package specification.
  10822. (c)  In example 2 (see 10.1.2):  The specification  of  the  package  STOCK
  10823.      must  be  compiled before the procedure PROCESSOR.  On the other hand,
  10824.      the procedure PROCESSOR can be compiled either  before  or  after  the
  10825.      package body STOCK.
  10826. (d)  In example 3 (see 10.2.1):  The procedure G must be compiled after the
  10827.      package  TEXT_IO  since this package is named by the with clause of G.
  10828.      On the other hand, TEXT_IO can be compiled either before or after TOP.
  10829. (e)  In example 3 (see 10.2.1):  The subunits TRANSFORM and  FACILITY  must
  10830.      be compiled after the main program TOP.  Similarly, the subunit G must
  10831.      be compiled after its \vparent unit\v1004. FACILITY.
  10832. \uNotes:\n
  10833. For  library  packages,  it  follows  from  the  recompilation rules that a
  10834. package body is made obsolete by the  recompilation  of  the  corresponding
  10835. specification.   If  the  new  package specification is such that a package
  10836. body is not required (that  is,  if  the  package  specification  does  not
  10837. contain  the  declaration  of  a program unit), then the recompilation of a
  10838. body for this package is not required.  In any case, the  obsolete  package
  10839. body  must  not  be  used  and  can  therefore  be deleted from the program
  10840. library.
  10841. :1007
  10842. 10.4  \uThe Program Library\n
  10843. Compilers are required to enforce the language rules in the same manner for
  10844. a  program  consisting of several \vcompilation units\v1001. (and \vsubunits\v1004.) as for a
  10845. program submitted as a single compilation.  Consequently,  a  library  file
  10846. containing information on the compilation units of the program library must
  10847. be  maintained  by the compiler or compiling environment.  This information
  10848. may include symbol tables and other information  pertaining to the order of
  10849. previous compilations.
  10850. A normal submission to the compiler consists of the compilation unit(s) and
  10851. the library file.  The latter is used for checks and is  updated  for  each
  10852. compilation unit successfully compiled.
  10853. \uNotes:\n
  10854. A  single  \vprogram\v1001.  library  is  implied  for  the  compilation  units of a
  10855. compilation.  The possible existence of different \vprogram libraries\v1001. and the
  10856. means by which they are named are not concerns of the language  definition;
  10857. they are concerns of the programming environment.
  10858. There  should  be  commands  for  creating  the  program library of a given
  10859. program or of a given family of programs.  These commands  may  permit  the
  10860. reuse  of  units  of  other  program  libraries.   Finally, there should be
  10861. commands for interrogating the status of the units of  a  program  library.
  10862. The form of these commands is not specified by the language definition.
  10863. :1008
  10864. 10.5  \uElaboration of Library Units\n
  10865. Before  the  execution  of  a main program, all \vlibrary units\v1001. needed by the
  10866. main program are elaborated, as well  as  the  corresponding  library  unit
  10867. bodies,  if  any.  The library units needed by the main program are:  those
  10868. \vnamed\v401. by with clauses applicable to the \vmain program\v1001., to its body,  and  to
  10869. its  \vsubunits\v1004.;   those  named  by  \vwith clauses\v1002. applicable to these library
  10870. units themselves, to the corresponding library unit bodies,  and  to  their
  10871. subunits;  and so on, in a transitive manner.
  10872. The  \velaboration\v333.  of  these  library units and of the corresponding library
  10873. unit bodies is performed in an order consistent with the  partial  ordering
  10874. defined  by  the  with  clauses  (see  10.3).   In addition, a library unit
  10875. mentioned by the \vcontext clause\v1002. of a subunit must be elaborated before  the
  10876. body of the ancestor library unit of the subunit.
  10877. An  order of elaboration that is consistent with this partial ordering does
  10878. not always ensure that each library unit  body  is  elaborated  before  any
  10879. other \vcompilation unit\v1001. whose elaboration necessitates that the library unit
  10880. body  be  already  elaborated.   If  the  prior elaboration of library unit
  10881. bodies is needed, this can be requested by a \vpragma\v210. ELABORATE.  The form of
  10882. this pragma is as follows:
  10883.     pragma ELABORATE (library_unit_simple_name {, library_unit_simple_name});
  10884. These pragmas are only \vallowed\v108. immediately after the context  clause  of  a
  10885. compilation  unit  (before  the subsequent library unit or \vsecondary unit\v1001.).
  10886. Each \vargument of such a pragma\v210. must be the \vsimple name\v401. of  a  library  unit
  10887. mentioned  by the context clause, and this library unit must have a library
  10888. unit body.  Such a pragma specifies that the  library  unit  body  must  be
  10889. elaborated  before  the  given  compilation unit.  If the given compilation
  10890. unit is a subunit, the library unit body must be elaborated before the body
  10891. of the ancestor library unit of the subunit.
  10892. The program is \villegal\v108. if no consistent order can be found (that is,  if  a
  10893. circularity  exists).   The  elaboration  of  the  compilation units of the
  10894. program is performed \vin some order\v108. that is otherwise  not  defined  by  the
  10895. language.
  10896. :1009
  10897. 10.6  \uProgram Optimization\n
  10898. Optimization  of  the  elaboration  of  \vdeclarations\v301.  and  the execution of
  10899. \vstatements\v500. may be performed by compilers.  In particular, a compiler may be
  10900. able to optimize a \vprogram\v1000. by evaluating certain \vexpressions\v410.,  in  addition
  10901. to  those  that  are  \vstatic expressions\v422..  Should one of these expressions,
  10902. whether static or not, be such that an \vexception\v1100. would  be  raised  by  its
  10903. \vevaluation\v411.,  then  the  code in that path of the program can be replaced by
  10904. code to raise the exception;  the same holds for exceptions raised  by  the
  10905. evaluation of names and simple expressions.  (See also section 11.6.)
  10906. A  compiler  may  find  that  some  statements or \vsubprograms\v600. will never be
  10907. executed, for example, if their execution depends on a \vcondition\v504.  known  to
  10908. be FALSE.  The corresponding object machine code can then be omitted.  This
  10909. rule permits the effect of conditional compilation within the language.
  10910. Note:
  10911. An  expression  whose  evaluation  is  known to raise an exception need not
  10912. represent an error if it occurs in a statement or subprogram that is  never
  10913. executed.  The compiler may warn the programmer of a potential error.
  10914. :1100
  10915. 11. \uExceptions\n
  10916. This  chapter  defines  the  facilities  for  dealing  with \verrors\v108. or other
  10917. exceptional  situations  that  arise  during  program  execution.   Such  a
  10918. situation  is  called  an  exception.   To raise an exception is to abandon
  10919. normal program execution so as to draw  attention  to  the  fact  that  the
  10920. corresponding situation has arisen.  Executing some actions, in response to
  10921. the arising of an exception, is called handling the exception.
  10922. An  exception  declaration  declares a \vname\v401. for an exception.  An exception
  10923. can be raised by a  \vraise  statement\v1103.,  or  it  can  be  raised  by  another
  10924. statement  or  operation  that \vpropagates the exception\v1105..  When an exception
  10925. arises, control can be transferred to a user-provided \vexception handler\v1102.  at
  10926. the  end  of  a  \vblock statement\v507. or at the end of the body of a \vsubprogram\v603.,
  10927. \vpackage\v701., or task unit.
  10928. More details:
  10929.  11.1    \vException Declarations\v1101.
  10930.  11.2    \vException Handlers\v1102.
  10931.  11.3    \vRaise Statements\v1103.
  10932.  11.4    \vException Handling\v1104.
  10933.  11.5    \vExceptions Raised During Task Communication\v1107.
  10934.  11.6    \vExceptions and Optimization\v1108.
  10935.  11.7    \vSuppressing Checks\v1109.
  10936. :1101
  10937. 11.1  \uException Declarations\n
  10938. An exception \vdeclaration\v301. declares a \vname\v401. for an \vexception\v1100..  The name of  an
  10939. exception  can  only  be  used in \vraise statements\v1103., \vexception handlers\v1102., and
  10940. renaming declarations.
  10941.     exception_declaration ::= identifier_list : exception;
  10942. An exception declaration  with  several  \videntifiers\v203.  is  equivalent  to  a
  10943. sequence  of  single  exception  declarations, as explained in section 3.2.
  10944. Each  single  exception  declaration  declares  a  name  for  a   different
  10945. exception.   In  particular,  if  a  \vgeneric  unit\v1200.  includes  an  exception
  10946. declaration, the exception \vdeclarations implicitly\v1206. generated  by  different
  10947. \vinstantiations\v1206.  of  the  generic unit refer to distinct exceptions (but all
  10948. have  the  same  identifier).   The  particular  exception  denoted  by  an
  10949. exception name is determined at compilation time and is the same regardless
  10950. of  how  many  times the exception declaration is elaborated.  Hence, if an
  10951. exception declaration occurs in a recursive \vsubprogram\v600., the exception  name
  10952. denotes the same exception for all invocations of the recursive subprogram.
  10953. The  following  exceptions are predefined in the language;  they are raised
  10954. when the situations described are detected.
  10955. CONSTRAINT_ERROR  This  exception  is  raised  in  any  of  the   following
  10956.                   situations:    upon   an   attempt  to  violate  a  \vrange\v310.
  10957.                   \vconstraint\v310.,  an  \vindex  constraint\v322.,  or  a   \vdiscriminant\v327.
  10958.                   \vconstraint\v327.;   upon  an  attempt to use a \vrecord component\v325.
  10959.                   that does not exist for the current discriminant  values;
  10960.                   and  upon  an  attempt  to  use  a \vselected component\v404., an
  10961.                   \vindexed component\v402., a \vslice\v403., or an attribute, of an \vobject\v302.
  10962.                   designated by an \vaccess value\v330., if  the  object  does  not
  10963.                   exist because the \vaccess value is null\v330..
  10964.    NUMERIC_ERROR  This exception is raised by the execution of a predefined
  10965.                   \vnumeric  operation\v315.  that  cannot deliver a correct result
  10966.                   (within the declared  accuracy  for  \vreal  types\v316.);   this
  10967.                   includes   the   case  where  an  implementation  uses  a
  10968.                   predefined   numeric   operation   for   the   execution,
  10969.                   evaluation,  or \velaboration\v333. of some construct.  The rules
  10970.                   given in section 4.5.7  define  the  cases  in  which  an
  10971.                   implementation  is  not  required to raise this exception
  10972.                   when such an error situation arises;   see  also  section
  10973.                   11.6.
  10974.    PROGRAM_ERROR  This exception is  raised  upon  an  attempt  to  call  a
  10975.                   subprogram, to \vactivate a task\v903., or to elaborate a \vgeneric\v1206.
  10976.                   \vinstantiation\v1206.,  if the body of the corresponding unit has
  10977.                   not yet been elaborated.  This exception is  also  raised
  10978.                   if the end of a function is reached (see 6.5);  or during
  10979.                   the  execution of a \vselective wait\v908. that has no else part,
  10980.                   if this execution determines that  all  alternatives  are
  10981.                   closed   (see   9.7.1).    Finally,   depending   on  the
  10982.                   implementation, this exception  may  be  raised  upon  an
  10983.                   attempt  to  execute an action that is \verroneous\v108., and for
  10984.                   \vincorrect order dependences\v108..
  10985.    STORAGE_ERROR  This  exception  is  raised  in  any  of  the   following
  10986.                   situations:  when the dynamic storage allocated to a \vtask\v900.
  10987.                   is  exceeded;   during the evaluation of an \vallocator\v421., if
  10988.                   the space  available  for  the  \vcollection\v330.  of  allocated
  10989.                   objects  is  exhausted;   or  during the elaboration of a
  10990.                   declarative item, or during the execution of a subprogram
  10991.                   call, if storage is not sufficient.
  10992.    TASKING_ERROR  This exception is raised  when  exceptions  arise  during
  10993.                   intertask communication (see 9 and 11.5).
  10994. Note:
  10995. The  situations described above can arise without raising the corresponding
  10996. exceptions, if the pragma SUPPRESS has been used to give permission to omit
  10997. the corresponding checks (see 11.7).
  10998. Examples of user-defined exception declarations:
  10999.     SINGULAR : exception;
  11000.     ERROR    : exception;
  11001.     OVERFLOW, UNDERFLOW : exception;
  11002. :1102
  11003. 11.2  \uException Handlers\n
  11004. The  response  to  one  or  more  \vexceptions\v1100.  is  specified by an exception
  11005. handler.
  11006.     exception_handler ::=
  11007.        \uwhen\n exception_choice {| exception_choice} =>
  11008.           \vsequence_of_statements\v501.
  11009.     exception_choice ::= exception_name | others
  11010. An exception handler occurs in a construct that is either a \vblock statement\v507.
  11011. or the body of a \vsubprogram\v603., \vpackage\v701., \vtask unit\v900., or \vgeneric unit\v1201..   Such  a
  11012. construct  will be called a frame in this chapter.  In each case the syntax
  11013. of a frame that has exception handlers includes the following part:
  11014.     \ubegin\n
  11015.         sequence_of_statements
  11016.     \uexception\n
  11017.         exception_handler
  11018.        {exception_handler}
  11019.     \uend\n
  11020. The exceptions denoted by the exception names given as exception choices of
  11021. a frame must all be distinct.  The exception choice others is only  allowed
  11022. for the last exception handler of a frame and as its only exception choice;
  11023. it  stands for all exceptions not listed in previous handlers of the frame,
  11024. including exceptions whose \vnames\v401. are  not  visible  at  the  place  of  the
  11025. exception handler.
  11026. The  exception handlers of a frame handle exceptions that are raised by the
  11027. execution of the sequence of  statements  of  the  frame.   The  exceptions
  11028. handled  by  a given exception handler are those named by the corresponding
  11029. exception choices.
  11030. Example:
  11031.     \ubegin\n
  11032.        --  sequence of statements
  11033.     \uexception\n
  11034.        \uwhen\nSINGULAR | NUMERIC_ERROR =>
  11035.           PUT(" MATRIX IS SINGULAR ");
  11036.        \uwhen others\n =>
  11037.           PUT(" FATAL ERROR ");
  11038.           \uraise\n ERROR;
  11039.     end;
  11040. Note:
  11041. The same kinds of \vstatement\v500. are allowed in the sequence  of  statements  of
  11042. each  exception handler as are allowed in the sequence of statements of the
  11043. frame.   For example, a \vreturn statement\v509. is allowed in a handler  within  a
  11044. \vfunction body\v603..
  11045. :1103
  11046. 11.3  \uRaise Statements\n
  11047. A raise statement raises an \vexception\v1100..
  11048.     raise_statement ::= raise [exception_name];
  11049. For the execution of a raise statement with an exception  \vname\v401.,  the  named
  11050. exception  is  raised.  A raise statement without an exception name is only
  11051. allowed within an  exception  handler  (but  not  within  the  \vsequence  of\v501.
  11052. \vstatements\v501.  of  a \vsubprogram\v600., \vpackage\v700., \vtask unit\v900., or \vgeneric unit\v1200., enclosed
  11053. by the handler);  it raises again the exception that caused transfer to the
  11054. innermost enclosing handler.
  11055. \uExamples:\n
  11056.     \uraise\n SINGULAR;
  11057.     \uraise\n NUMERIC_ERROR;  --  explicitly raising a predefined exception
  11058.     \uraise\n;                --  only within an exception handler
  11059. :1104
  11060. 11.4  \uException Handling\n
  11061. When  an  \vexception\v1100.  is  raised,  normal program execution is abandoned and
  11062. control is transferred to an \vexception  handler\v1102..   The  selection  of  this
  11063. handler  depends on whether the exception is raised during the execution of
  11064. \vstatements\v500. or during the \velaboration of declarations\v301..
  11065. More details:
  11066.  11.4.1  \vExceptions Raised During the Execution of Statements\v1105.
  11067.  11.4.2  \vExceptions Raised During the Elaboration of Declarations\v1106.
  11068. :1105
  11069. 11.4.1  \uExceptions Raised During the Execution of Statements\n
  11070. The  handling  of  an  \vexception\v1100.  raised  by the execution of a \vsequence of\v501.
  11071. \vstatements\v501. depends on whether the innermost frame or \vaccept statement\v905.  that
  11072. encloses the sequence of \vstatements\v500. is a \vframe\v1102. or an accept statement.  The
  11073. case  where  an accept statement is innermost is described in section 11.5.
  11074. The case where a frame is innermost is presented here.
  11075. Different actions take place, depending on whether or not this frame has  a
  11076. handler  for  the  exception, and on whether the exception is raised in the
  11077. sequence of statements of the frame or in that of an \vexception handler\v1102..
  11078. If an exception is raised in the sequence of statements of a frame that has
  11079. a handler for the exception, execution of the sequence of statements of the
  11080. frame is abandoned and control is transferred  to  the  exception  handler.
  11081. The  execution  of  the sequence of statements of the handler completes the
  11082. execution of the frame (or its \velaboration\v301. if the frame is a \vpackage body\v701.).
  11083. If an exception is raised in the sequence of statements  of  a  frame  that
  11084. does  not  have  a handler for the exception, execution of this sequence of
  11085. statements is abandoned.  The next action depends  on  the  nature  of  the
  11086. frame:
  11087. (a)  For a \vsubprogram body\v603., the same exception is raised again at the point
  11088.      of  \vcall  of the subprogram\v606., unless the \vsubprogram\v600. is the \vmain program\v1001.
  11089.      itself, in which case execution of the main program is abandoned.
  11090. (b)  For a \vblock statement\v507., the same exception is raised again  immediately
  11091.      after  the  block  statement  (that is, within the innermost enclosing
  11092.      frame or accept statement).
  11093. (c)  For a package body that is a \vdeclarative item\v333., the same  exception  is
  11094.      raised  again  immediately  after  this  declarative  item (within the
  11095.      enclosing \vdeclarative part\v333.). If the package body is that of a \vsubunit\v1004.,
  11096.      the exception is raised again at the place of the  corresponding  \vbody\v1004.
  11097.      \vstub\v1004..  If the \vpackage\v700. is a \vlibrary unit\v1001., execution of the main program
  11098.      is abandoned.
  11099. (d)  For a \vtask body\v901., the \vtask\v900. becomes completed.
  11100. An exception that is raised again (as in the above cases (a), (b), and (c))
  11101. is  said  to  be propagated, either by the execution of the subprogram, the
  11102. execution of the block statement, or the elaboration of the  package  body.
  11103. No  propagation  takes place in the case of a task body.  If the frame is a
  11104. subprogram or a  block  statement  and  if  it  has  \vdependent  tasks\v904.,  the
  11105. propagation  of  an  exception  takes  place  only after termination of the
  11106. dependent tasks.
  11107. Finally, if an exception is raised in the  sequence  of  statements  of  an
  11108. exception  handler,  execution of this sequence of statements is abandoned.
  11109. Subsequent actions (including propagation, if any) are as in the cases  (a)
  11110. to (d) above, depending on the nature of the frame.
  11111. Example:
  11112.     function FACTORIAL (N : POSITIVE) return FLOAT is
  11113.     \ubegin\n 
  11114.        \uif\n N = 1 \uthen\n 
  11115.           \ureturn\n 1.0;
  11116.        \uelse\n
  11117.           \ureturn\n FLOAT(N) * FACTORIAL(N-1);
  11118.        \uend if\n;
  11119.     \uexception\n 
  11120.        \uwhen\n NUMERIC_ERROR => \ureturn\n FLOAT'SAFE_LARGE;
  11121.     \uend\n FACTORIAL;
  11122. If  the  multiplication  raises  NUMERIC_ERROR,  then  FLOAT'SAFE_LARGE  is
  11123. returned by the handler.   This  value  will  cause  further  \vNUMERIC_ERROR\v1101.
  11124. \vexceptions\v1101.  to be raised by the evaluation of the expression in each of the
  11125. remaining invocations of the function, so that for large values  of  N  the
  11126. function will ultimately return the value FLOAT'SAFE_LARGE.
  11127. Example:
  11128.     \vprocedure\v601. P is
  11129.        ERROR : \uexception\n;
  11130.        \uprocedure\n R;
  11131.        \uprocedure\n Q is
  11132.        \ubegin\n 
  11133.           R;
  11134.           ...            --  error situation (2)
  11135.        \uexception\n 
  11136.           ...
  11137.           \uwhen\n ERROR =>  --  handler E2
  11138.           ...
  11139.        \uend\n Q;
  11140.        \uprocedure\n R is
  11141.        \ubegin\n 
  11142.           ...            --  error situation (3)
  11143.        \uend\n R;
  11144.     \ubegin\n 
  11145.        ...               --  error situation (1)
  11146.        Q;
  11147.        ...
  11148.     \uexception\n 
  11149.        ...
  11150.        \uwhen\n ERROR =>     --  handler E1
  11151.        ...
  11152.     \uend\n P;
  11153. The following situations can arise:
  11154. (1)  If the exception ERROR is raised in the sequence of statements of  the
  11155.      outer  procedure  P,  the  handler  E1  provided  within  P is used to
  11156.      complete the execution of P.
  11157. (2)  If the exception ERROR is raised in the sequence of statements  of  Q,
  11158.      the  handler E2 provided within Q is used to complete the execution of
  11159.      Q.  Control will be returned to the point of call of Q upon \vcompletion\v904.
  11160.      of the handler.
  11161. (3)  If the exception ERROR is raised in the body of R, called  by  Q,  the
  11162.      execution  of  R  is abandoned and the same exception is raised in the
  11163.      body of Q.  The handler E2 is then used to complete the  execution  of
  11164.      Q, as in situation (2).
  11165. Note  that  in  the  third  situation, the exception raised in R results in
  11166. (indirectly) transferring control to a handler that is part of Q and  hence
  11167. not  enclosed by R.  Note also that if a handler were provided within R for
  11168. the exception choice others, situation (3) would cause  execution  of  this
  11169. handler, rather than direct termination of R.
  11170. Lastly,  if ERROR had been declared in R, rather than in P, the handlers E1
  11171. and E2  could  not  provide  an  explicit  handler  for  ERROR  since  this
  11172. identifier would not be visible within the bodies of P and Q.  In situation
  11173. (3), the exception could however be handled in Q by providing a handler for
  11174. the exception choice others.
  11175. \uNotes:\n
  11176. The  language  does  not define what happens when the execution of the main
  11177. program is abandoned after an unhandled exception.
  11178. The predefined exceptions are those that can be  propagated  by  the  \vbasic\v308.
  11179. \voperations\v308. and the \vpredefined operators\v411..
  11180. The  case of a frame that is a \vgeneric unit\v1200. is already covered by the rules
  11181. for subprogram and package bodies, since the sequence of statements of such
  11182. a frame is not executed but is the template for the corresponding sequences
  11183. of  statements  of  the  subprograms  or  packages  obtained   by   \vgeneric\v1206.
  11184. \vinstantiation\v1206..
  11185. :1106
  11186. 11.4.2  \uExceptions Raised During the Elaboration of Declarations\n
  11187. If an \vexception\v1100. is raised during the \velaboration\v301. of the \vdeclarative part\v333. of
  11188. a given \vframe\v1102., this elaboration is abandoned.  The next action  depends  on
  11189. the nature of the frame:
  11190. (a)  For a \vsubprogram body\v603., the same exception is raised again at the point
  11191.      of  \vcall  of the subprogram\v606., unless the \vsubprogram\v600. is the \vmain program\v1001.
  11192.      itself, in which case execution of the main program is abandoned.
  11193. (b)  For a \vblock statement\v507., the same exception is raised again  immediately
  11194.      after the block statement.
  11195. (c)  For a \vpackage body\v701. that is a \vdeclarative item\v333., the same  exception  is
  11196.      raised again immediately after this declarative item, in the enclosing
  11197.      declarative  part.   If  the  package  body  is that of a \vsubunit\v1004., the
  11198.      exception is raised again at the place of the corresponding \vbody stub\v1004..
  11199.      If the package is a \vlibrary unit\v1001., execution of  the  main  program  is
  11200.      abandoned.
  11201. (d)  For a \vtask  body\v901.,  the  \vtask  becomes  completed\v904.,  and  the  \vexception\v1101.
  11202.      \vTASKING_ERROR\v1101.  is  raised  at  the point of \vactivation\v903. of the \vtask\v900., as
  11203.      explained in section 9.3.
  11204. Similarly, if an exception is raised during the  elaboration  of  either  a
  11205. \vpackage  declaration\v701.  or a \vtask declaration\v901., this elaboration is abandoned;
  11206. the next action depends on the nature of the declaration.
  11207. (e)  For a package declaration or a task declaration, that is a declarative
  11208.      item, the exception is raised again immediately after the  declarative
  11209.      item  in the enclosing declarative part or \vpackage specification\v701..  For
  11210.      the declaration of a  library  package,  the  execution  of  the  main
  11211.      program is abandoned.
  11212. An  exception that is raised again (as in the above cases (a), (b), (c) and
  11213. (e)) is said to be propagated, either by the execution of the subprogram or
  11214. block statement, or by the elaboration of  the  package  declaration,  task
  11215. declaration or package body.
  11216. Example of an exception in the declarative part of a block statement (case
  11217. (b)):
  11218.     \uprocedure\n P \uis\n 
  11219.        ...
  11220.     \ubegin\n 
  11221.        declare
  11222.           N : INTEGER := F;  --  the function F may raise ERROR
  11223.        \ubegin\n 
  11224.           ...
  11225.        \uexception\n 
  11226.           \uwhen\n ERROR =>      --  handler E1
  11227.        \uend\n ;
  11228.        ...
  11229.     \uexception\n
  11230.        \uwhen\n ERROR =>         --  handler E2
  11231.     \uend\nP;
  11232.     --  if the exception ERROR is raised in the declaration of N, it is
  11233.         handled by E2
  11234. :1107
  11235. 11.5  \uExceptions Raised During Task Communication\n
  11236. An  \vexception\v1100.  can  be propagated to a task communicating, or attempting to
  11237. communicate, with another \vtask\v900..  An exception can also be propagated  to  a
  11238. calling task if the exception is raised during a \vrendezvous\v905..
  11239. When  a task calls an entry of another task, the \vexception TASKING_ERROR\v1101. is
  11240. raised in the calling task, at the place of the call, if the called task is
  11241. completed before accepting the \ventry call\v905. or is already  completed  at  the
  11242. time of the call.
  11243. A rendezvous can be completed abnormally in two cases:
  11244. (a)  When an exception is  raised  within  an  \vaccept  statement\v905.,  but  not
  11245.      handled  within  an  inner  \vframe\v1102..  In this case, the execution of the
  11246.      accept statement is abandoned and the same exception is  raised  again
  11247.      immediately  after  the  accept  statement within the called task; the
  11248.      exception is also propagated to the calling task at the point  of  the
  11249.      entry call.
  11250. (b)  When the task containing the accept statement is completed  abnormally
  11251.      as  the  result  of  an  \vabort statement\v913..  In this case, the exception
  11252.      TASKING_ERROR is raised in the calling task at the point of the  entry
  11253.      call.
  11254. On the other hand, if a task issuing an entry call becomes abnormal (as the
  11255. result  of  an  abort statement) no exception is raised in the called task.
  11256. If the rendezvous has not yet started, the entry call is cancelled.  If the
  11257. rendezvous is in progress, it completes normally, and the  called  task  is
  11258. unaffected.
  11259. :1108
  11260. 11.6  \uExceptions and Optimization\n
  11261. The purpose of this section is to specify the  conditions  under  which  an
  11262. implementation  is  allowed  to  perform  certain actions either earlier or
  11263. later than specified by other rules of the language.
  11264. In general, when the language rules specify an order  for  certain  actions
  11265. (the  canonical order), an implementation may only use an alternative order
  11266. if it can guarantee that the effect of the program is not  changed  by  the
  11267. reordering.   In particular, no \vexception\v1100. should arise for the execution of
  11268. the reordered program if none arises for the execution of  the  program  in
  11269. the canonical order.  When, on the other hand, the order of certain actions
  11270. is   not   defined   by  the  language,  any  order  can  be  used  by  the
  11271. implementation.  (For example, the arguments of a \vpredefined  operator\v411.  can
  11272. be  evaluated  in  any   order  since the rules given in section 4.5 do not
  11273. require a specific order of evaluation.)
  11274. Additional freedom is left to  an  implementation  for  reordering  actions
  11275. involving  predefined  operations  that  are either predefined operators or
  11276. \vbasic operations\v308. other than \vassignments\v502..  This freedom is left, as  defined
  11277. below,  even in the case where the execution of these predefined operations
  11278. may \vpropagate a (predefined) exception\v1104.:
  11279. (a)  For the purpose of establishing whether the same effect is obtained by
  11280.      the  execution  of  certain  actions  in  the  canonical  and  in   an
  11281.      alternative  order,  it  can  be  assumed  that none of the predefined
  11282.      operations  invoked  by  these  actions  propagates   a   (predefined)
  11283.      exception, provided that the two following requirements are met by the
  11284.      alternative  order:   first,  an  operation must not be invoked in the
  11285.      alternative order if  it  is  not  invoked  in  the  canonical  order;
  11286.      second,  for  each  operation, the innermost enclosing \vframe\v1102. or \vaccept\v905.
  11287.      \vstatement\v905. must be  the  same  in  the  alternative  order  as  in  the
  11288.      canonical order, and the same \vexception handlers\v1102. must apply.
  11289. (b)  Within an expression, the association of operators  with  operands  is
  11290.      specified  by  the  syntax.   However,  for  a  sequence of predefined
  11291.      operators of  the  same  precedence  level  (and  in  the  absence  of
  11292.      parentheses  imposing  a  specific  association),  any  association of
  11293.      operators with operands is  allowed  if  it  satisfies  the  following
  11294.      requirement:   an  integer  result  must be equal to that given by the
  11295.      canonical left-to-right order;  a  real  result  must  belong  to  the
  11296.      result  model  interval  defined for the canonical left-to-right order
  11297.      (see 4.5.7).  Such a reordering is allowed even if it  may  remove  an
  11298.      exception, or introduce a further predefined exception.
  11299. Similarly,  additional  freedom  is  left  to  an  implementation  for  the
  11300. evaluation  of  numeric  simple  expressions.   For  the  evaluation  of  a
  11301. predefined  operation, an implementation is allowed to use the operation of
  11302. a type that has a range wider than that of the \vbase type\v305. of  the  operands,
  11303. provided  that  this  delivers  the  exact  result  (or a result within the
  11304. declared \vaccuracy\v418., in the case of a \vreal type\v316.), even if  some  intermediate
  11305. results   lie   outside   the  range  of  the  base  type.   The  \vexception\v1101.
  11306. \vNUMERIC_ERROR\v1101. need not be raised in such a case.   In  particular,  if  the
  11307. numeric  expression  is an operand of a predefined relational operator, the
  11308. exception NUMERIC_ERROR need  not  be  raised  by  the  evaluation  of  the
  11309. relation, provided that the correct BOOLEAN result is obtained.
  11310. A preedefined  operation  need  not be invoked at all, if its only possible
  11311. effect is to propagate a predefined  exception.   Similarly,  a  predefined
  11312. operation  need  not  be invoked if the removal of subsequent operations by
  11313. the above rule renders this invocation ineffective.
  11314. \uNotes:\n
  11315. Rule (b) applies to predefined  operators  but  not  to  the  short-circuit
  11316. control forms.
  11317. The  expression  SPEED  <  300_000.0  can  be replaced by TRUE if the value
  11318. 300_000.0 lies outside the base type of SPEED,  even  though  the  implicit
  11319. \vconversion\v419.  of the numeric literal would raise the exception NUMERIC_ERROR.
  11320. Example:
  11321.     declare
  11322.        N : INTEGER;
  11323.     \ubegin\n
  11324.        N := 0;               --  (1)
  11325.        \ufor\n J \uin\n 1 .. 10 \uloop\n
  11326.           N := N + J**A(K);  --  A and K are global variables
  11327.        \uend loop\n;
  11328.        PUT(N);
  11329.     \uexception\n
  11330.        \uwhen others\n => PUT("Some error arose"); PUT(N);
  11331.     \uend\n;
  11332. The evaluation of A(K) may be  performed  before  the  loop,  and  possibly
  11333. immediately before the assignment statement (1) even if this evaluation can
  11334. raise  an exception.  Consequently, within the exception handler, the value
  11335. of N is either the undefined initial value or a value later  assigned.   On
  11336. the  other  hand, the evaluation of A(K) cannot be moved before begin since
  11337. an exception would then be  handled  by  a  different  handler.   For  this
  11338. reason, the initialization of N in the declaration itself would exclude the
  11339. possibility of having an undefined initial value of N in the handler.
  11340. :1109
  11341. 11.7  \uSuppressing Checks\n
  11342. The  presence of a SUPPRESS \vpragma\v210. gives permission to an implementation to
  11343. omit certain run-time checks.  The form of this pragma is as follows:
  11344.     pragma SUPPRESS(identifier [, [ON =>] name]);
  11345. The \videntifier\v203. is that of the check that can  be  omitted.   The  name  (if
  11346. present)  must  be  either  a  \vsimple  name\v401. or an \vexpanded name\v404. and it must
  11347. denote either an \vobject\v302., a \vtype\v305. or \vsubtype\v305., a \vtask unit\v900., or a \vgeneric unit\v1200.;
  11348. alternatively the name can be a subprogram name, in which case it can stand
  11349. for several visible overloaded \vsubprograms\v600..
  11350. A pragma SUPPRESS is only allowed immediately within a \vdeclarative part\v333.  or
  11351. immediately  within  a \vpackage specification\v701..  In the latter case, the only
  11352. allowed form is with a name that denotes an entity (or  several  overloaded
  11353. subprograms)  declared  immediately  within the package specification.  The
  11354. permission to omit the given check extends from the place of the pragma  to
  11355. the  end  of the declarative region associated with the innermost enclosing
  11356. \vblock statement\v507.  or  \vprogram  unit\v600..   For  a  pragma  given  in  a  package
  11357. specification,  the permission extends to the end of the scope of the named
  11358. entity.
  11359. If the pragma includes a name, the permission to omit the  given  check  is
  11360. further restricted:  it is given only for \voperations\v308. on the named object or
  11361. on all objects of the base type of a named type or subtype;  for calls of a
  11362. named subprogram;  for \vactivations\v903. of \vtasks\v900. of the named \vtask type\v901.;  or for
  11363. instantiations of the given generic unit.
  11364. The  following  checks  correspond  to  situations  in  which the \vexception\v1101.
  11365. \vCONSTRAINT_ERROR\v1101. may be raised; for these checks,  the  name  (if  present)
  11366. must denote either an object or a type.
  11367. ACCESS_CHECK          When  accessing  a  selected  component,  an  \vindexed\v402.
  11368.                       \vcomponent\v402.,  a  \vslice\v403.,  or  an \vattribute\v405., of an object
  11369.                       \vdesignated\v330. by an \vaccess value\v330., check that the  access
  11370.                       value is not null.
  11371. DISCRIMINANT_CHECK    Check that a \vdiscriminant\v326. of a  composite  value  has
  11372.                       the  value  imposed  by  a  \vdiscriminant  constraint\v327..
  11373.                       Also, when accessing a \vrecord component\v325.,  check  that
  11374.                       it exists for the current discriminant values.
  11375. INDEX_CHECK           Check that the bounds of an \varray\v321. value are equal  to
  11376.                       the  corresponding  bounds  of  an  \vindex constraint\v322..
  11377.                       Also, when accessing a \vcomponent of an array\v321.  object,
  11378.                       check  for  each \vdimension\v321. that the given index value
  11379.                       belongs to the range defined by  the  bounds  of  the
  11380.                       array  object.   Also,  when  accessing a slice of an
  11381.                       array object, check that the given \vdiscrete range\v321.  is
  11382.                       \vcompatible\v307.  with  the  range defined by the bounds of
  11383.                       the array object.
  11384. LENGTH_CHECK          Check that there is a  matching  component  for  each
  11385.                       component   of   an  array,  in  the  case  of  array
  11386.                       assignments, type conversions, and logical  operators
  11387.                       for arrays of boolean components.
  11388. RANGE_CHECK           Check that a  value  satisfies  a  \vrange  constraint\v310..
  11389.                       Also,  for  the  \velaboration\v301. of a subtype indication,
  11390.                       check that the \vconstraint\v305. (if present) is  compatible
  11391.                       with  the  \vtype  mark\v307..  Also, for an \vaggregate\v407., check
  11392.                       that an \vindex\v321. or discriminant value  belongs  to  the
  11393.                       corresponding   subtype.    Finally,  check  for  any
  11394.                       constraint   checks   performed    by    a    \vgeneric\v1206.
  11395.                       \vinstantiation\v1206..
  11396. The  following  checks  correspond  to  situations  in  which the \vexception\v1101.
  11397. \vNUMERIC_ERROR\v1101. is raised.  The  only  allowed  names  in  the  corresponding
  11398. pragmas are names of \vnumeric types\v310..
  11399. DIVISION_CHECK        Check that the second operand is  not  zero  for  the
  11400.                       operations /, rem and mod.
  11401. OVERFLOW_CHECK        Check that the result of a \vnumeric operation\v315. does not
  11402.                       overflow.
  11403. The  following  check  corresponds  to  situations  in  which the \vexception\v1101.
  11404. \vPROGRAM_ERROR\v1101. is raised.  The  only  allowed  names  in  the  corresponding
  11405. pragmas are names denoting task units, generic units, or subprograms.
  11406. ELABORATION_CHECK     When either a subprogram is called, a task activation
  11407.                       is   accomplished,  or  a  generic  instantiation  is
  11408.                       elaborated, check that the body of the  corresponding
  11409.                       unit has already been elaborated.
  11410. The  following  check  corresponds  to  situations  in  which the exception
  11411. STORAGE_ERROR is raised.  The  only  allowed  names  in  the  corresponding
  11412. pragmas are names denoting \vaccess types\v330., task units, or subprograms.
  11413. STORAGE_CHECK         Check that execution of an \vallocator\v421. does not require
  11414.                       more space than is available for a \vcollection\v330..  Check
  11415.                       that the space available for a task or subprogram has
  11416.                       not been exceeded.
  11417. If  an  \verror situation\v1100. arises in the absence of the corresponding run-time
  11418. checks, the execution of the program is  \verroneous\v108.  (the  results  are  not
  11419. defined by the language).
  11420. \uExamples:\n
  11421.     \upragma \nSUPPRESS(RANGE_CHECK);
  11422.     \upragma \nSUPPRESS(INDEX_CHECK, ON => TABLE);
  11423. \uNotes:\n
  11424. For certain implementations, it may be impossible or too costly to suppress
  11425. certain  checks.  The corresponding SUPPRESS pragma can be ignored.  Hence,
  11426. the occurrence of such a pragma within a given unit does not guarantee that
  11427. the corresponding exception will not arise;  the  exceptions  may  also  be
  11428. propagated by called units.
  11429. :1200
  11430. 12. \uGeneric Units\n
  11431. A generic unit is a \vprogram unit\v600. that is either a \vgeneric subprogram\v1201.  or  a
  11432. \vgeneric  package\v1201..   A generic unit is a template, which is parameterized or
  11433. not, and from which corresponding (nongeneric) \vsubprograms\v600. or \vpackages\v700.  can
  11434. be  obtained.   The resulting program units are said to be \vinstances\v1206. of the
  11435. original generic unit.
  11436. A generic unit  is  declared  by  a  \vgeneric  declaration\v1201..   This  form  of
  11437. \vdeclaration\v301.  has  a  \vgeneric  formal  part\v1201.  declaring  any  \vgeneric  formal\v1201.
  11438. \vparameters\v1201..  An instance of a generic unit is obtained as the result  of  a
  11439. \vgeneric  instantiation\v1206.  with  appropriate \vgeneric actual parameters\v1206. for the
  11440. generic formal parameters.  An  instance  of  a  generic  subprogram  is  a
  11441. subprogram.  An instance of a generic package is a package.
  11442. Generic  units are templates.  As templates they do not have the properties
  11443. that are specific to their nongeneric counterparts.  For example, a generic
  11444. subprogram can be instantiated but it cannot be called.  In  contrast,  the
  11445. instance  of  a generic subprogram is a nongeneric subprogram;  hence, this
  11446. instance can be called but it cannot be used to produce further  instances.
  11447. More details:
  11448.  12.1    \vGeneric Declarations\v1201.
  11449.  12.2    \vGeneric Bodies\v1205.
  11450.  12.3    \vGeneric Instantiation\v1206.
  11451.  12.4    \vExample of a Generic Package\v1213.
  11452. :1201
  11453. 12.1  \uGeneric Declarations\n
  11454. A generic \vdeclaration\v301. declares a generic unit, which is  either  a  generic
  11455. subprogram  or a generic package.  A generic declaration includes a generic
  11456. formal part declaring any generic  formal  parameters.   A  generic  formal
  11457. parameter  can  be  an  \vobject\v302.;   alternatively  (unlike  a  \vparameter of a\v602.
  11458. \vsubprogram\v602.), it can be a \vtype\v305. or a \vsubprogram\v600..
  11459.     generic_declaration ::= generic_specification;
  11460.     generic_specification ::=
  11461.          generic_formal_part \vsubprogram_specification\v601.
  11462.        | generic_formal_part \vpackage_specification\v701.
  11463.     generic_formal_part ::= generic {generic_parameter_declaration}
  11464.     generic_parameter_declaration ::=
  11465.          \videntifier_list\v302. : [\uin \n[\uout\n]] type_mark [:= expression];
  11466.        | \utype \nidentifier \uis \ngeneric_type_definition;
  11467.        | \vprivate_type_declaration\v704.
  11468.        | \uwith \nsubprogram_specification [\uis \nname];
  11469.        | \uwith \nsubprogram_specification [\uis \n<>];
  11470.     generic_type_definition ::=
  11471.          (<>) | \urange \n<> | \udigits \n<> | \udelta \n<>
  11472.        | \varray_type_definition\v321. | \vaccess_type_definition\v330.
  11473. The terms generic formal object (or simply, formal object), generic  formal
  11474. type  (or  simply,  formal type), and generic formal subprogram (or simply,
  11475. formal subprogram) are  used  to  refer  to  corresponding  generic  formal
  11476. parameters.
  11477. The only form of \vsubtype indication\v307. allowed within a generic formal part is
  11478. a  \vtype  mark\v307. (that is, the subtype indication must not include an explicit
  11479. \vconstraint\v305.).  The \vdesignator\v601. of a generic subprogram must be an \videntifier\v203..
  11480. Outside the specification and body of a generic  unit,  the  \vname\v401.  of  this
  11481. program unit denotes the generic unit.  In contrast, within the declarative
  11482. region  associated with a generic subprogram, the name of this program unit
  11483. denotes the subprogram obtained by the current instantiation of the generic
  11484. unit.  Similarly, within the declarative region associated with  a  generic
  11485. package,  the name of this program unit denotes the package obtained by the
  11486. current instantiation.
  11487. The elaboration of a generic declaration has no other effect.
  11488. Examples of generic formal parts:
  11489.     generic     --  parameterless
  11490.     generic
  11491.        SIZE : NATURAL;  --  formal object
  11492.     generic
  11493.        LENGTH : INTEGER := 200;           -- formal object with a default
  11494.                                              expression
  11495.        AREA   : INTEGER := LENGTH*LENGTH; -- formal object with a default
  11496.                                              expression
  11497.     generic
  11498.        \utype \nITEM  \uis private\n;                       -- formal type
  11499.        \utype \nINDEX \uis\n (<>);                          -- formal type
  11500.        \utype \nROW   \uis array\n(INDEX \urange \n<>) \uof \nITEM; -- formal type
  11501.        \uwith\n \vfunction\v609. "<"(X, Y : ITEM) \ureturn\n BOOLEAN;    -- formal subprogram
  11502. Examples of generic declarations declaring generic subprograms:
  11503.     generic
  11504.        \utype\n ELEM \uis private\n;
  11505.     \vprocedure\v601. EXCHANGE(U, V : \uin out\n ELEM);
  11506.     generic
  11507.        \utype\n ITEM \uis private\n;
  11508.        \uwith function\n "*"(U, V : ITEM) \ureturn\n ITEM \uis\n <>;
  11509.     \ufunction\n SQUARING(X : ITEM) \ureturn\n ITEM;
  11510. Example of a generic declaration declaring a generic package:
  11511.     generic
  11512.        \utype\n ITEM   \uis private\n;
  11513.        \utype\n VECTOR \uis array\n (POSITIVE \urange\n <>) \uof\n ITEM;
  11514.        \uwith function\n SUM(X, Y : ITEM) \ureturn\n ITEM;
  11515.     \upackage\n ON_VECTORS \ui\ns
  11516.        \ufunction\n SUM  (A, B : VECTOR) \ureturn\n VECTOR;
  11517.        \ufunction\n SIGMA(A    : VECTOR) \ureturn\n ITEM;
  11518.        LENGTH_ERROR : \uexception\n;
  11519.        \uend\n;
  11520. \uNotes:\n
  11521. Within a generic subprogram, the name of this program unit acts as the name
  11522. of a subprogram.  Hence this name can be \voverloaded\v610., and it can appear in a
  11523. recursive call of the current instantiation.  For  the  same  reason,  this
  11524. name  cannot  appear  after  the \vreserved word\v211. new in a (recursive) \vgeneric\v1206.
  11525. \vinstantiation\v1206..
  11526. An \vexpression\v410. that occurs in a generic formal part is  either  the  default
  11527. expression  for  a generic formal object of mode in, or a constituent of an
  11528. entry name given as default name for a formal subprogram,  or  the  default
  11529. expression for a parameter of a formal subprogram.  Default expressions for
  11530. generic  formal  objects  and default names for formal subprograms are only
  11531. evaluated for generic  instantiations  that  use  such  defaults.   Default
  11532. expressions  for  parameters  of  formal subprograms are only evaluated for
  11533. calls of the  formal  subprograms  that  use  such  defaults.   (The  usual
  11534. visibility  rules  apply  to  any  name  used in a default expression:  the
  11535. denoted \ventity\v301. must therefore be visible at the place of  the  expression.)
  11536. Neither   generic  formal  parameters  nor  their  \vattributes\v405.  are  allowed
  11537. constituents of \vstatic expressions\v422..
  11538. More details:
  11539.  12.1.1  \vGeneric Formal Objects\v1202.
  11540.  12.1.2  \vGeneric Formal Types\v1203.
  11541.  12.1.3  \vGeneric Formal Subprograms\v1204.
  11542. :1202
  11543. 12.1.1  \uGeneric Formal Objects\n
  11544. The first form of \vgeneric parameter  declaration\v1201.  declares  \vgeneric  formal\v1201.
  11545. \vobjects\v1201..   The type of a generic formal object is the \vbase type\v305. of the type
  11546. denoted by the \vtype mark\v307. given in the  generic  parameter  declaration.   A
  11547. generic  parameter  declaration with several \videntifiers\v203. is equivalent to a
  11548. sequence of single generic parameter declarations, as explained in  section
  11549. A  generic  formal  object  has a \vmode\v601. that is either in or in out.  In the
  11550. absence of an explicit mode indication in a generic parameter  declaration,
  11551. the  mode  in  is  assumed;  otherwise the mode is the one indicated.  If a
  11552. generic parameter declaration ends with an expression,  the  expression  is
  11553. the  default  expression  of  the  \vgeneric  formal  parameter\v1201..   A  default
  11554. expression is only allowed  if  the  mode  is  in  (whether  this  mode  is
  11555. indicated explicitly or implicitly).  The type of a default expression must
  11556. be that of the corresponding generic formal parameter.
  11557. A  generic  formal object of mode in is a constant whose value is a copy of
  11558. the value supplied as the \vmatching generic actual parameter\v1206.  in  a  \vgeneric\v1206.
  11559. \vinstantiation\v1206.,  as described in section 12.3.  The type of a generic formal
  11560. object of mode in must not be a  \vlimited  type\v708.;   the  \vsubtype\v305.  of  such  a
  11561. generic  formal object is the subtype denoted by the type mark given in the
  11562. generic parameter declaration.
  11563. A generic formal object of mode in out is a \vvariable\v303. and denotes the \vobject\v302.
  11564. supplied  as  the  matching  \vgeneric  actual   parameter\v1206.   in   a   generic
  11565. instantiation, as described in section 12.3.  The \vconstraints\v305. that apply to
  11566. the  generic  formal  object  are those of the corresponding generic actual
  11567. parameter.
  11568. Note:
  11569. The constraints that apply to a generic formal object of mode  in  out  are
  11570. those  of  the corresponding generic actual parameter (not those implied by
  11571. the type mark that appears in the generic parameter declaration).  Whenever
  11572. possible (to avoid confusion) it is recommended that the  \vname\v401.  of  a  base
  11573. type be used for the \vdeclaration\v301. of such a formal object.  If, however, the
  11574. base  type is \vanonymous\v306., it is recommended that the subtype name defined by
  11575. the \vtype declaration\v305. for the base type be used.
  11576. :1203
  11577. 12.1.2  \uGeneric Formal Types\n
  11578. A \vgeneric parameter declaration\v1201. that includes a \vgeneric type definition\v1201.  or
  11579. a  \vprivate  type  declaration\v704.  declares  a  \vgeneric formal type\v1201..  A generic
  11580. formal type denotes  the  subtype  supplied  as  the  corresponding  actual
  11581. parameter  in  a  generic instantiation, as described in 12.3(d).  However,
  11582. within a generic unit,  a  generic  formal  type  is  considered  as  being
  11583. distinct  from  all  other  (formal  or  nonformal)  types.   The  form  of
  11584. \vconstraint\v305. applicable to a formal type in a \vsubtype indication\v307.  depends  on
  11585. the \vclass of the type\v305. as for a nonformal type.
  11586. The only form of \vdiscrete range\v321. that is allowed within the \vdeclaration\v301. of a
  11587. generic formal (constrained) array type is a \vtype mark\v307..
  11588. The  \vdiscriminant  part\v326. of a generic formal private type must not include a
  11589. default expression for a discriminant.  (Consequently, a variable  that  is
  11590. declared  by  an  object  declaration  must be constrained if its type is a
  11591. generic formal type with discriminants.)
  11592. Within the declaration and \vbody of a generic unit\v1205., the \voperations\v305. available
  11593. for values of a generic formal type (apart from  any  additional  operation
  11594. specified  by  a  \vgeneric  formal subprogram\v1204.) are determined by the generic
  11595. parameter declaration for the formal type:
  11596. (a)  For a private type declaration, the  available  operations  are  those
  11597.      defined  in  section  7.4.2  (in particular, \vassignment\v502., \vequality\v413., and
  11598.      \vinequality\v413. are available for a private type unless it is limited).
  11599. (b)  For an \varray type  definition\v321.,  the  available  operations  are  those
  11600.      defined  in  section 3.6.2 (for example, they include the formation of
  11601.      \vindexed components\v402. and \vslices\v403.).
  11602. (c)  For an \vaccess type definition\v330.,  the  available  operations  are  those
  11603.      defined in section 3.8.2 (for example, \vallocators\v421. can be used).
  11604. The  four forms of generic type definition in which a box appears (that is,
  11605. the compound delimiter <>) correspond  to  the  following  major  forms  of
  11606. \vscalar type\v310.:
  11607. (d)  \vDiscrete types\v310.:  (<>)
  11608.      The  available operations are the operations common to \venumeration\v311. and
  11609.      \vinteger types\v314.; these are defined in section 3.5.5.
  11610. (e)  Integer types:  range <>
  11611.      The available operations are the operations of integer  types  defined
  11612.      in section 3.5.5.
  11613. (f)  \vFloating point types\v317.:  digits <>
  11614.      The available operations are those defined in section 3.5.8.
  11615. (g)  \vFixed point types\v319.:  delta <>
  11616.      The available operations are those defined in section 3.5.10.
  11617. In  all  of  the  above  cases  (a)  through (f), each operation implicitly
  11618. associated with a formal type (that is, other than an  operation  specified
  11619. by  a  formal  subprogram)  is  implicitly  declared  at  the  place of the
  11620. declaration of the formal type.  The same holds for a  formal  fixed  point
  11621. type,  except  for  the  \vmultiplying operators\v411. that deliver a result of the
  11622. type  \vuniversal_fixed\v319.  (see  4.5.5),  since  these  special  \voperators\v411.  are
  11623. declared in the \vpackage STANDARD\v806..
  11624. For  an  \vinstantiation\v1206. of the generic unit, each of these operations is the
  11625. corresponding basic operation or predefined operator of the matching actual
  11626. type.  For an operator, this rule applies even if  the  operator  has  been
  11627. redefined  for  the actual type or for some \vparent type\v309. of the actual type.
  11628. Examples of generic formal types:
  11629.     \utype\n ITEM \uis private\n;
  11630.     \utype\n BUFFER(LENGTH : NATURAL) \uis\n \vlimited private\v708.;
  11631.     \utype\n ENUM  \uis\n (<>);
  11632.     \utype\n INT   \uis range\n <>;
  11633.     \utype\n ANGLE \uis delta\n <>;
  11634.     \utype\n MASS  \uis digits\n <>;
  11635.     \utype\n TABLE \uis array\n (ENUM) \uof\n ITEM;
  11636. Example of a \vgeneric formal part\v1201. declaring a formal integer type:
  11637.     generic
  11638.        \utype\n RANK \uis range\n <>;
  11639.        FIRST  : RANK := RANK'FIRST;
  11640.        SECOND : RANK := FIRST + 1;  --  the operator "+" of the type RANK
  11641. :1204
  11642. 12.1.3  \uGeneric Formal Subprograms\n
  11643. A  \vgeneric  parameter  declaration\v1201. that includes a \vsubprogram specification\v601.
  11644. declares a \vgeneric formal subprogram\v1201..
  11645. Two alternative forms of defaults can be specified in the declaration of  a
  11646. generic formal subprogram.  In these forms, the subprogram specification is
  11647. followed  by  the  \vreserved  word\v211.  is  and  either  a  box or the name of a
  11648. \vsubprogram\v600. or entry.  The matching rules for these defaults  are  explained
  11649. in section 12.3.6.
  11650. A generic formal subprogram denotes the subprogram, enumeration literal, or
  11651. entry  supplied  as the corresponding \vgeneric actual parameter\v1206. in a \vgeneric\v1206.
  11652. \vinstantiation\v1206., as described in section 12.3(f).
  11653. Examples of generic formal subprograms:
  11654.     \uwith function\n INCREASE(X : INTEGER) \ureturn\n INTEGER;
  11655.     \uwith function\n SUM(X, Y : ITEM) \ureturn\n ITEM;
  11656.     \uwith function\n "+"(X, Y : ITEM) \ureturn\n ITEM \uis\n <>;
  11657.     \uwith function\n IMAGE(X : ENUM) \ureturn\n STRING \uis\n ENUM'IMAGE;
  11658.     \uwith procedure\n UPDATE \uis\n DEFAULT_UPDATE;
  11659. \uNotes:\n
  11660. The \vconstraints\v305. that apply to a parameter of a formal subprogram are  those
  11661. of  the corresponding parameter in the specification of the matching actual
  11662. subprogram (not those  implied  by  the  corresponding  \vtype  mark\v307.  in  the
  11663. specification  of  the formal subprogram).  A similar remark applies to the
  11664. result of a function.   Whenever  possible  (to  avoid  confusion),  it  is
  11665. recommended  that the name of a \vbase type\v305. be used rather than the name of a
  11666. \vsubtype\v307. in any declaration of a formal subprogram.  If, however,  the  base
  11667. type  is  \vanonymous\v306., it is recommended that the subtype name defined by the
  11668. \vtype\v305. declaration be used.
  11669. The type specified for a formal parameter of a  generic  formal  subprogram
  11670. can  be  any  visible  type,  including  a  generic formal type of the same
  11671. generic formal part.
  11672. :1205
  11673. 12.2  \uGeneric Bodies\n
  11674. The  \vbody\v333.  of a \vgeneric subprogram\v1201. or \vgeneric package\v1201. is a template for the
  11675. bodies of the corresponding \vsubprograms\v600. or  \vpackages\v700.  obtained  by  \vgeneric\v1206.
  11676. \vinstantiations\v1206..   The  syntax  of  a \vgeneric body\v1201. is identical to that of a
  11677. nongeneric body.
  11678. For each declaration of a generic subprogram, there must be a corresponding
  11679. body.
  11680. The \velaboration\v333. of a generic body has no other  effect  than  to  establish
  11681. that  the  body  can from then on be used as the template for obtaining the
  11682. corresponding \vinstances\v1206..
  11683. Example of a generic procedure body:
  11684.     procedure EXCHANGE(U, V : in out ELEM) is  --  see example in 12.1
  11685.        T : ELEM;  --  the generic formal type
  11686.     \ubegin\n
  11687.        T := U;
  11688.        U := V;
  11689.        V := T;
  11690.     \uend\n EXCHANGE;
  11691. Example of a generic function body:
  11692.     \ufunction\n SQUARING(X : ITEM) \ureturn\n ITEM \uis\n --  see example in 12.1
  11693.     \ubegin\n
  11694.        \ureturn\n X*X;  --  the formal operator "*"
  11695.     \uend\n;
  11696. Example of a generic package body:
  11697.     \vpackage body\v701. ON_VECTORS \uis\n --  see example in 12.1
  11698.        \ufunction\n SUM(A, B : VECTOR) \ureturn\n VECTOR \uis\n
  11699.           RESULT : VECTOR(A'RANGE);     --  the formal type VECTOR
  11700.           BIAS   : constant INTEGER := B'FIRST - A'FIRST;
  11701.        \ubegin\n
  11702.           \uif\n A'LENGTH /= B'LENGTH \uthen\n
  11703.             \uraise\n LENGTH_ERROR;
  11704.           \uend if\n;
  11705.           \ufor\n N \uin\n A'RANGE \uloop\n
  11706.              RESULT(N) := SUM(A(N), B(N + BIAS)); -- the formal
  11707.              \uend loop\n;                               function SUM
  11708.           \ureturn\n RESULT;
  11709.        \uend\n;
  11710.        \ufunction\n SIGMA(A : VECTOR) \ureturn\n ITEM \uis\n
  11711.           TOTAL : ITEM := A(A'FIRST);            -- the formal type ITEM
  11712.        \ubegin\n
  11713.           \ufor\n N \uin\n A'FIRST + 1 .. A'LAST \uloop\n
  11714.              TOTAL := SUM(TOTAL, A(N));          -- the formal function SUM
  11715.           \uend loop\n;
  11716.           \ureturn\n TOTAL;
  11717.        \uend\n;
  11718.     \uend\n;
  11719. :1206
  11720. 12.3  \uGeneric Instantiation\n
  11721. An instance of a generic unit is declared by a generic instantiation.
  11722.     generic_instantiation ::=
  11723.          \upackage\n \videntifier\v203. \uis\n
  11724.              \unew\n generic_package_name [generic_actual_part];
  11725.        | \uprocedure\n identifier \uis\n
  11726.              \unew\n generic_procedure_name [generic_actual_part];
  11727.        | \ufunction\n designator \uis\n
  11728.              \unew\n generic_function_name [generic_actual_part];
  11729.     generic_actual_part ::=
  11730.        (generic_association {, generic_association})
  11731.     generic_association ::=
  11732.        [\vgeneric_formal_parameter\v1201. =>] generic_actual_parameter
  11733.     generic_formal_parameter ::= parameter_simple_name | \voperator_symbol\v601.
  11734.     generic_actual_parameter ::= \vexpression\v410. | variable_name
  11735.        | \vsubprogram_name\v601. | \ventry_name\v905. | \vtype_mark\v307.
  11736. An  explicit  generic  actual  parameter  must be supplied for each generic
  11737. formal parameter, unless the corresponding  \vgeneric  parameter  declaration\v1201.
  11738. specifies  that  a default can be used.  Generic associations can be either
  11739. positional or named  in  the  same  manner  as  parameter  associations  of
  11740. \vsubprogram  calls\v606..   If two or more formal subprograms have the
  11741. same  \vdesignator\v601.,  then  named  associations  are  not  allowed   for   the
  11742. corresponding generic parameters.
  11743. Each  generic  actual parameter must match the corresponding generic formal
  11744. parameter.  An expression can match a formal object of \vmode in\v1202.;  a variable
  11745. name can match a formal object of \vmode in out\v1202.;  a  subprogram  name  or  an
  11746. entry  name  can match a formal subprogram;  a type mark can match a formal
  11747. type.  The detailed  rules  defining  the  allowed  matches  are  given  in
  11748. sections 12.3.1 to 12.3.6;  these are the only allowed matches.
  11749. The  instance  is a copy of the generic unit, apart from the generic formal
  11750. part;  thus the instance of a generic package  is  a  \vpackage\v700.,  that  of  a
  11751. generic  procedure  is  a  procedure,  and  that of a generic function is a
  11752. function.  For each  occurrence, within the generic unit, of  a  \vname\v401.  that
  11753. denotes  a given \ventity\v301., the following list defines which entity is denoted
  11754. by the corresponding occurrence within the instance.
  11755. (a)  For a  name  that  denotes  the  generic  unit:     The  corresponding
  11756.      occurrence denotes the instance.
  11757. (b)  For a name that denotes a \vgeneric formal  object\v1201.  of  mode  in:    The
  11758.      corresponding  name  denotes  a  constant whose value is a copy of the
  11759.      value of the associated generic actual parameter.
  11760. (c)  For a name that denotes a generic formal object of mode in out:    The
  11761.      corresponding  name  denotes  the  \vvariable\v303.  named  by  the associated
  11762.      generic actual parameter.
  11763. (d)  For a name that denotes a \vgeneric  formal  type\v1201.:    The  corresponding
  11764.      name  denotes  the  subtype  named  by  the  associated generic actual
  11765.      parameter (the actual subtype).
  11766. (e)  For a name that denotes a \vdiscriminant\v326. of a generic formal type:   The
  11767.      corresponding name denotes the corresponding discriminant (there  must
  11768.      be one) of the actual type associated with the generic formal type.
  11769. (f)  For  a  name  that  denotes  a  \vgeneric  formal   subprogram\v1201.:      The
  11770.      corresponding  name  denotes  the  \vsubprogram\v600., enumeration literal, or
  11771.      entry named by the associated generic  actual  parameter  (the  actual
  11772.      subprogram).
  11773. (g)  For a name that  denotes  a  formal  parameter  of  a  generic  formal
  11774.      subprogram:    The corresponding name denotes the corresponding formal
  11775.      parameter  of  the  actual  subprogram  associated  with  the   formal
  11776.      subprogram.
  11777. (h)  For a name that denotes a local entity  declared  within  the  generic
  11778.      unit:    The  corresponding  name  denotes  the entity declared by the
  11779.      corresponding \vlocal declaration\v801. within the instance.
  11780. (i)  For a name that denotes  a  global  entity  declared  outside  of  the
  11781.      generic unit:   The corresponding name denotes the same global entity.
  11782. Similar  rules  apply  to  operators  and basic \voperations\v305.:  in particular,
  11783. formal operators follow a rule similar to rule (f), local operations follow
  11784. a rule similar to rule (h), and operations for global types follow  a  rule
  11785. similar  to rule (i).  In addition, if within the generic unit a predefined
  11786. operator or basic operation of a formal  type  is  used,  then  within  the
  11787. instance   the   corresponding   occurrence  refers  to  the  corresponding
  11788. predefined operation of the actual type associated with the formal type.
  11789. The above rules apply also to any type mark or (default)  expression  given
  11790. within the generic formal part of the generic unit.
  11791. For the \velaboration\v301. of a generic instantiation, each expression supplied as
  11792. an  explicit  generic  actual parameter is first evaluated, as well as each
  11793. expression that appears as a constituent of a variable name or  entry  name
  11794. supplied  as  an  explicit  generic  actual  parameter;   these \vevaluations\v411.
  11795. proceed in some order that is not defined by the language.  Then, for  each
  11796. omitted  generic association (if any), the corresponding default expression
  11797. or default name is evaluated;  such evaluations are performed in the  order
  11798. of  the  generic parameter declarations.  Finally, the implicitly generated
  11799. instance is elaborated.  The elaboration of  a  generic  instantiation  may
  11800. also  involve  certain constraint checks as described in later subsections.
  11801. Recursive generic instantiation is not allowed in the following sense:   if
  11802. a  given  generic  unit includes an instantiation of a second generic unit,
  11803. then the instance generated by  this  instantiation  must  not  include  an
  11804. instance  of  the  first  generic  unit (whether this instance is generated
  11805. directly, or indirectly by intermediate instantiations).
  11806. Examples of generic instantiations (see 12.1):
  11807.     \uprocedure\n SWAP \uis new\n EXCHANGE(ELEM => INTEGER);
  11808.     \uprocedure\n SWAP \uis new\n EXCHANGE(CHARACTER);  --  SWAP is \voverloaded\v610.
  11809.     \ufunction\n SQUARE \uis new\n SQUARING(INTEGER);
  11810.                                          --  "*" of INTEGER used by default
  11811.     \ufunction\n SQUARE \uis new\n SQUARING(ITEM => MATRIX, "*" => MATRIX_PRODUCT);
  11812.     \ufunction\n SQUARE \uis new\n SQUARING(MATRIX, MATRIX_PRODUCT);
  11813.                                                         -- same as previous
  11814.     \upackage\n INT_VECTORS \uis new\n ON_VECTORS(INTEGER, TABLE, "+");
  11815. Examples of uses of instantiated units:
  11816.     SWAP(A, B);
  11817.     A := SQUARE(A);
  11818.     T : TABLE(1 .. 5) := (10, 20, 30, 40, 50);
  11819.     N : INTEGER := INT_VECTORS.SIGMA(T);  --  150 (see 12.2 for the body of
  11820.                                               SIGMA)
  11821.     \uuse\n INT_VECTORS;
  11822.     M : INTEGER := SIGMA(T);  --  150
  11823. \uNotes:\n
  11824. Omission of a generic actual parameter is only allowed if  a  corresponding
  11825. default exists.  If default expressions or default names (other than \vsimple\v401.
  11826. \vnames\v401.) are used, they are evaluated in the order in which the corresponding
  11827. generic formal parameters are declared.
  11828. If  two  overloaded subprograms declared in a generic package specification
  11829. differ only by the (formal) type of  their  parameters  and  results,  then
  11830. there  exist  legal instantiations for which all calls of these subprograms
  11831. from outside the instance are ambiguous.  For example:
  11832.     generic
  11833.        \utype\n A \uis\n (<>);
  11834.        \utype\n B \uis private\n;
  11835.     \upackage\n G \uis\n
  11836.        \ufunction\n NEXT(X : A) \ureturn\n A;
  11837.        \ufunction\n NEXT(X : B) \ureturn\n B;
  11838.     \uend\n;
  11839.     \upackage\n P \uis new\n G(A => BOOLEAN, B => BOOLEAN);
  11840.     -- calls of P.NEXT are ambiguous
  11841. More details:
  11842.  12.3.1  \vMatching Rules for Formal Objects\v1207.
  11843.  12.3.2  \vMatching Rules for Formal Private Types\v1208.
  11844.  12.3.3  \vMatching Rules for Formal Scalar Types\v1209.
  11845.  12.3.4  \vMatching Rules for Formal Array Types\v1210.
  11846.  12.3.5  \vMatching Rules for Formal Access Types\v1211.
  11847.  12.3.6  \vMatching Rules for Formal Subprograms\v1212.
  11848. :1207
  11849. 12.3.1  \uMatching Rules for Formal Objects\n
  11850. A \vgeneric formal parameter\v1201. of \vmode in\v1202. of a given  \vtype\v305.  is  matched  by  an
  11851. \vexpression\v410. of the same type.  If a \vgeneric unit\v1201. has a \vgeneric formal object\v1202.
  11852. of  mode  in,  a check is made that the value of the expression  belongs to
  11853. the subtype  denoted  by  the  \vtype  mark\v307.,  as  for  an  explicit  constant
  11854. declaration  (see  3.2.1). The \vexception CONSTRAINT_ERROR\v1101. is raised if this
  11855. check fails.
  11856. A generic formal parameter of \vmode in out\v1202. of a given type is matched by the
  11857. \vname\v401. of a \vvariable\v303. of the same type.  The variable must  not  be  a  \vformal\v601.
  11858. \vparameter\v601.  of  \vmode  out\v602. or a \vsubcomponent\v305. thereof.  The name must denote a
  11859. variable for which renaming is allowed (see 8.5).
  11860. \uNotes:\n
  11861. The type of a \vgeneric actual parameter\v1206. of mode in must  not  be  a  \vlimited\v708.
  11862. \vtype\v708..   The \vconstraints\v305. that apply to a generic formal parameter of mode in
  11863. out are those of the corresponding generic actual parameter  (see  12.1.1).
  11864. :1208
  11865. 12.3.2  \uMatching Rules for Formal Private Types\n
  11866. A generic formal \vprivate type\v704. is matched by any \vtype\v305. or \vsubtype\v305. (the actual
  11867. subtype) that satisfies the following conditions:
  11868.   -  If the formal type is not limited, the  actual  type  must  not  be  a
  11869.      \vlimited  type\v708..  (If, on the other hand, the formal type is limited, no
  11870.      such condition is imposed on the corresponding actual type, which  can
  11871.      be limited or not limited.)
  11872.   -  If the formal type has a \vdiscriminant part\v326., the actual type must be  a
  11873.      type   with   the  same  number  of  \vdiscriminants\v326.;   the  type  of  a
  11874.      discriminant that appears at a given position in the discriminant part
  11875.      of the actual type must be the same as the type  of  the  discriminant
  11876.      that  appears  at  the  same  position in the discriminant part of the
  11877.      formal type;  and the actual subtype must be unconstrained.   (If,  on
  11878.      the  other hand, the formal type has no discriminants, the actual type
  11879.      is allowed to have discriminants.)
  11880. Furthermore, consider any occurrence of the \vname\v401. of the formal  type  at  a
  11881. place  where this name is used as an unconstrained \vsubtype indication\v307..  The
  11882. actual subtype must not be an \vunconstrained array type\v321. or an  unconstrained
  11883. \vtype  with  discriminants\v305.,  if any of these occurrences is at a place where
  11884. either a \vconstraint\v305. or \vdefault discriminants\v326. would be required for an \varray\v321.
  11885. \vtype\v321. or for a type with discriminants (see  3.6.1  and  3.7.2).   The  same
  11886. restriction  applies  to occurrences of the name of a subtype of the formal
  11887. type, and to occurrences of the  name  of  any  type  or  subtype  derived,
  11888. directly or indirectly, from the formal type.
  11889. If  a  generic  unit  has  a  formal  private  type with discriminants, the
  11890. \velaboration\v333. of  a  corresponding  \vgeneric  instantiation\v1206.  checks  that  the
  11891. subtype  of each discriminant of the actual type is the same as the subtype
  11892. of the corresponding  discriminant  of  the  formal  type.   The  \vexception\v1101.
  11893. \vCONSTRAINT_ERROR\v1101. is raised if this check fails.
  11894. :1209
  11895. 12.3.3  \uMatching Rules for Formal Scalar Types\n
  11896. A  \vgeneric  formal  type\v1203. defined by (<>) is matched by any \vdiscrete\v310. subtype
  11897. (that is, any \venumeration\v311. or  \vinteger\v314.  subtype).   A  generic  formal  type
  11898. defined  by  range <> is matched by any integer subtype.   A generic formal
  11899. type defined by digits <> is matched by  any  \vfloating  point\v317.  subtype.   A
  11900. generic  formal  type  defined  by  delta  <> is matched by any \vfixed point\v319.
  11901. subtype.  No other matches are possible for these generic formal types.
  11902. :1210
  11903. 12.3.4  \uMatching Rules for Formal Array Types\n
  11904. A  formal  \varray  type\v321. is matched by an actual array \vsubtype\v305. that satisfies
  11905. the following conditions:
  11906.   -  The formal array type and the actual array type  must  have  the  same
  11907.      dimensionality;  the \vformal type\v1201. and the actual subtype must be either
  11908.      both \vconstrained\v321. or both \vunconstrained\v321..
  11909.   -  For each \vindex\v321. position, the index type  must  be  the  same  for  the
  11910.      actual array type as for the formal array type.
  11911.   -  The component type must be the same for the actual array type  as  for
  11912.      the  formal  array type.  If the component type is other than a scalar
  11913.      type, then the component subtypes must be either both  constrained  or
  11914.      both unconstrained.
  11915. If  a  generic  unit  has  a  formal  array  type,  the  \velaboration\v333.  of  a
  11916. corresponding instantiation checks that the \vconstraints\v305.  (if  any)  on  the
  11917. component  type  are  the  same for the actual array type as for the formal
  11918. array type, and likewise that  for  any  given  index  position  the  index
  11919. subtypes  or  the  discrete  ranges  have  the  same bounds.  The \vexception\v1101.
  11920. \vCONSTRAINT_ERROR\v1101. is raised if this check fails.
  11921. Example:
  11922.     --  given the generic package
  11923.     generic
  11924.        \utype\n ITEM   i\us privat\ne;
  11925.        \utype\n INDEX  \uis\n (<>);
  11926.        \utype\n VECTOR \uis array\n (INDEX \urange\n <>) \uof\n ITEM;
  11927.        \utype\n TABLE  \uis array\n (INDEX) \uof\n ITEM;
  11928.     \upackage\n P \uis\n
  11929.        ...
  11930.     \uend\n;
  11931.     --  and the types
  11932.     \utype\n MIX    \uis array\n (COLOR \urange\n <>) \uof\n BOOLEAN;
  11933.     \utype\n OPTION \uis array\n (COLOR) \uof\n BOOLEAN;
  11934.     --  then MIX can match VECTOR and OPTION can match TABLE
  11935.     \upackage\n R \uis new\n P(ITEM   => BOOLEAN, INDEX => COLOR,
  11936.                        VECTOR => MIX,     TABLE => OPTION);
  11937.     --  Note that MIX cannot match TABLE and OPTION cannot match VECTOR
  11938. Note:
  11939. For the above rules, if any of the index or component types of  the  formal
  11940. array  type  is  itself  a  formal  type, then within the instance its name
  11941. denotes the corresponding actual subtype (see 12.3(d)).
  11942. :1211
  11943. 12.3.5  \uMatching Rules for Formal Access Types\n
  11944. A  formal \vaccess type\v330. is matched by an actual access subtype if the type of
  11945. the designated \vobjects\v302. is the same for the actual type as  for  the  formal
  11946. type.   If  the  designated  type  is  other  than  a scalar type, then the
  11947. designated subtypes must be either both constrained or both  unconstrained.
  11948. If  a  generic  unit  has  a  formal  access  type,  the  \velaboration\v333.  of a
  11949. corresponding instantiation checks that any \vconstraints\v305. on  the  designated
  11950. objects are the same for the actual access subtype as for the formal access
  11951. type.  The \vexception CONSTRAINT_ERROR\v1101. is raised if this check fails.
  11952. Example:
  11953.     --  the formal types of the generic package
  11954.     generic
  11955.        \utype\n NODE \uis private\n;
  11956.        \utype\n LINK \uis access\n NODE;
  11957.     \upackage\n P \uis\n
  11958.        ...
  11959.     \uend\n;
  11960.     --  can be matched by the actual types
  11961.     \utype\n CAR;
  11962.     \utype\n CAR_NAME \uis access\n CAR;
  11963.     \utype\n CAR \uis\n
  11964.        \urecord\n
  11965.           PRED, SUCC : CAR_NAME;
  11966.           NUMBER     : LICENSE_NUMBER;
  11967.           OWNER      : PERSON;
  11968.        \uend record\n;
  11969.     --  in the following \vgeneric instantiation\v1206.
  11970.     \upackage\n R \uis new\n P(NODE => CAR, LINK => CAR_NAME);
  11971. Note:
  11972. For  the  above rules, if the designated type is itself a formal type, then
  11973. within the instance its name denotes the corresponding actual subtype  (see
  11974. 12.3(d)).
  11975. :1212
  11976. 12.3.6  \uMatching Rules for Formal Subprograms\n
  11977. A  formal  \vsubprogram\v600.  is  matched  by  an  actual  subprogram, enumeration
  11978. literal, or \ventry\v905. if both have the same \vparameter and result  type  profile\v603.
  11979. (see  6.6);   in  addition,  parameter  modes  must be identical for formal
  11980. parameters that are at the same parameter position.
  11981. If a generic unit has a default subprogram specified by a \vname\v401.,  this  name
  11982. must denote a subprogram, an enumeration literal, or an entry, that matches
  11983. the  formal subprogram (in the above sense).  The evaluation of the default
  11984. name takes place during the elaboration of each instantiation that uses the
  11985. default,  as defined in section 12.3.
  11986. If a generic unit has  a  default  subprogram  specified   by  a  box,  the
  11987. corresponding  actual parameter can be omitted if a subprogram, enumeration
  11988. literal, or entry  matching  the  formal  subprogram,  and  with  the  same
  11989. \vdesignator\v601.  as  the  formal subprogram, is directly visible at the place of
  11990. the \vgeneric instantiation\v1206.;  this subprogram, enumeration literal, or  entry
  11991. is  then used by default (there must be exactly one subprogram, enumeration
  11992. literal, or entry satisfying the previous conditions).
  11993. Example:
  11994.     --  given the generic function specification
  11995.     generic
  11996.        \utype\n ITEM \uis private\n;
  11997.        \uwith function\n "*" (U, V : ITEM) \ureturn\n ITEM \uis\n <>;
  11998.     \vfunction\v609. SQUARING(X : ITEM) \ureturn\n ITEM;
  11999.     --  and the function
  12000.     \ufunction\n MATRIX_PRODUCT(A, B : MATRIX) \ureturn\n MATRIX;
  12001.     --  the following instantiation is possible
  12002.     \ufunction\n SQUARE \uis new\n SQUARING(MATRIX, MATRIX_PRODUCT);
  12003.     --  the following instantiations are equivalent
  12004.     \ufunction\n SQUARE \uis new\n SQUARING(ITEM => INTEGER, "*" => "*");
  12005.     \ufunction\n SQUARE \uis new\n SQUARING(INTEGER, "*");
  12006.     \ufunction\n SQUARE \uis new\n SQUARING(INTEGER);
  12007. \uNotes:\n
  12008. The matching rules for  formal  subprograms  state  requirements  that  are
  12009. similar  to  those  applying to subprogram renaming declarations (see 8.5).
  12010. In particular, the name of a parameter of the formal subprogram need not be
  12011. the same as that of the corresponding parameter of the  actual  subprogram;
  12012. similarly,  for  these parameters, default expressions need not correspond.
  12013. A formal subprogram is matched by an \vattribute\v405. of a type if  the  attribute
  12014. is  a  function with a matching specification.  An enumeration literal of a
  12015. given type matches a parameterless formal function whose result type is the
  12016. given type.
  12017. :1213
  12018. 12.4  \uExample of a Generic Package\n
  12019. The following example provides a possible formulation of stacks by means of
  12020. a  generic  package.   The  size  of  each  stack and the type of the stack
  12021. elements are provided as generic parameters.
  12022.     generic
  12023.        SIZE : POSITIVE;
  12024.        \utype\n ITEM \uis private\n;
  12025.     \upackage\n STACK \uis\n
  12026.        \uprocedure\n PUSH(E : \uin\n ITEM);
  12027.        \uprocedure\n POP (E : \uout\n ITEM);
  12028.        OVERFLOW, UNDERFLOW : \uexception\n;
  12029.     \uend\n STACK;
  12030.     \upackage body\n STACK \uis\n
  12031.        \utype\n TABLE \uis array\n (POSITIVE \urange\n <>) \uof\n ITEM;
  12032.        SPACE : TABLE(1 .. SIZE);
  12033.        INDEX : NATURAL := 0;
  12034.        \uprocedure\n PUSH(E : \uin\n ITEM) \uis\n
  12035.        \ubegi\nn
  12036.           \uif\n INDEX >= SIZE \uthen\n
  12037.              \uraise\n OVERFLOW;
  12038.           \uend if\n;
  12039.           INDEX := INDEX + 1;
  12040.           SPACE(INDEX) := E;
  12041.        \uend\n PUSH;
  12042.        \uprocedure\n POP(E : \uout\n ITEM) \uis\n
  12043.        \ubegin\n
  12044.           \uif\n INDEX = 0 \uthen\n
  12045.              \uraise\n UNDERFLOW;
  12046.           \uend if\n;
  12047.           E := SPACE(INDEX);
  12048.           INDEX := INDEX - 1;
  12049.        \uend\n POP;
  12050.     \uend\n STACK;
  12051. Instances of this generic package can be obtained as follows:
  12052.     \upackage\n STACK_INT  \uis new\n STACK(SIZE => 200, ITEM => INTEGER);
  12053.     \upackage\n STACK_BOOL \uis new\n STACK(100, BOOLEAN);
  12054. Thereafter, the procedures of the instantiated packages can  be  called  as
  12055. follows:
  12056.     STACK_INT.PUSH(N);
  12057.     STACK_BOOL.PUSH(TRUE);
  12058. Alternatively,  a  generic  formulation  of  the type STACK can be given as
  12059. follows (package body omitted):
  12060.     generic
  12061.        \utype\n ITEM \uis private\n;
  12062.     \upackage\n ON_STACKS \uis\n
  12063.        \utype\n STACK(SIZE : POSITIVE) \uis limited private\n;
  12064.        \uprocedure\n PUSH(S : \uin out\n STACK; E : in  ITEM);
  12065.        \uprocedure\n POP (S : \uin out\n STACK; E : out ITEM);
  12066.        OVERFLOW, UNDERFLOW : \uexception\n;
  12067.     \uprivate\n
  12068.        \utype\n TABLE \uis array\n (POSITIVE \urange\n <>) \uof\n ITEM;
  12069.        \utype\n STACK(SIZE : POSITIVE) \uis\n
  12070.           \urecord\n
  12071.              SPACE : TABLE(1 .. SIZE);
  12072.              INDEX : NATURAL := 0;
  12073.           \uend record\n;
  12074.     \uend\n;
  12075. In order to use such a  package,  an  instantiation  must  be  created  and
  12076. thereafter stacks of the corresponding type can be declared:
  12077.     declare
  12078.        \upackage\n STACK_REAL \uis new\n ON_STACKS(REAL); \uuse\n STACK_REAL;
  12079.        S : STACK(100)
  12080.     \ubegin\n
  12081.        ...
  12082.        PUSH(S, 2.54);
  12083.        ...
  12084.     \uend\n;
  12085. :1300
  12086. 13. \uRepresentation Clauses and Implementation-Dependent Features\n
  12087. This chapter describes representation clauses, certain implementation-
  12088. dependent features, and other features that are used in system
  12089. programming.
  12090. More details:
  12091.  13.1    \vRepresentation Clauses\v1301.
  12092.  13.2    \vLength Clause\v1302.
  12093.  13.3    \vEnumeration Representation Clauses\v1303.
  12094.  13.4    \vRecord Representation Clauses\v1304.
  12095.  13.5    \vAddress Clauses\v1305.
  12096.  13.6    \vChange of Representation\v1307.
  12097.  13.7    \vThe Package System\v1308.
  12098.  13.8    \vMachine Code Insertions\v1312.
  12099.  13.9    \vInterface to other Languages\v1313.
  12100.  13.10   \vUnchecked Programming\v1314.
  12101. :1301
  12102. 13.1 \uRepresentation Clauses\n
  12103. Representation clauses specify how the \vtypes\v305. of the language are to be
  12104. mapped onto the underlying machine.  They can be provided to give more
  12105. efficient representation or to interface with features that are outside
  12106. the domain of the language (for example, peripheral hardware).
  12107.         representation_clause ::=
  12108.               type_representation_clause | address_clause
  12109.         type_representation_clause ::= \vlength_clause\v1302.
  12110.               | \venumeration_representation_clause\v1303.
  12111.               |\vrecord_representation_clause\v1304.
  12112. A type representation clause applies either to a type or to a first
  12113. \vnamed\v401. \vsubtype\v305. (that is, to a \vsubtype declared\v307. by a type \vdeclaration\v301.,
  12114. the base type being therefore anonymous).  Such a representation
  12115. clause applies to  all \vobjects\v302. that have this type or this first named
  12116. subtype.  At most one enumeration or record representation clause is
  12117. \vallowed\v108. for a given type: an enumeration representation clause is only
  12118. allowed for an enumeration type; a record representation clause, only
  12119. for a record type.  (On the other hand, more than one length clause
  12120. can be provided for a given type; moreover, both a length clause and
  12121. an enumeration or record representation clause can be provided.)  A
  12122. length clause is the only form of representation clause allowed for a
  12123. \vtype derived\v309. from a \vparent type\v309. that has (user-defined) \vderivable\v310.
  12124. \vsubprograms\310..
  12125. An \vaddress clause\v1305. applies either to an object; to a \vsubprogram\v600.,
  12126. \vpackage\v700., or \vtask unit\v900.; or to an \ventry\v905..  At most one address clause is
  12127. allowed for any of these entities.
  12128. A representation clause and declaration of the \ventity\v301. to which the
  12129. clause applies \vmust\v108. both \voccur immediately within\v801. the same \vdeclarative\v333.
  12130. \vpart\v333., \vpackage specification\v701., or \vtask specification\v901.; the declaration
  12131. must occur before the clause.  In the absence of a representation
  12132. clause for a given declaration, a default representation of this
  12133. declaration is determined by the implementation.  Such a default
  12134. determination occurs no later than the end of the immediately
  12135. enclosing declarative part, package specification, or task
  12136. specification.  For a declaration given in a declarative part, this
  12137. default determination occurs before any enclosed \vbody\v333..
  12138. In the case of a type, certain occurrences of its name imply that the
  12139. representation of the type must already have been determined.
  12140. Consequently these occurrences force the default determination of any
  12141. aspect of the representation not already determined by a prior type
  12142. representation clause.  This default determination is also forced by
  12143. similar occurrences of the name of a subtype of the type, or of the
  12144. name of any type or subtype that has \vsubcomponents\v305. of the type.  A
  12145. forcing occurence is any occurrence other than in a type or subtype
  12146. declaration, a subprogram specification, an entry declaration, a \vdeferred\v704.
  12147. \vconstant declaration\v704., a \vpragma\v1310., or a representation clause for the type
  12148. itself. In any case, an occurrence within an \vexpression\v410. is always forcing.
  12149. A representation clause for a given entity must not appear after an
  12150. occurrence of the name of the entity if this occurrence forces a
  12151. default determination of representation for the entity.
  12152. Similar restrictions exist for address clauses. For an object, any
  12153. occurrence of its name (after the object declaration) is a forcing
  12154. occurrence.  For a subprogram, package, task unit, or entry, any
  12155. occurrence of a \vrepresentation attribute\v1310. of such an entity is a
  12156. forcing occurrence.
  12157. The effect of the elaboration of a representation clause is to define
  12158. the corresponding aspects of the representation.
  12159. The interpretation of some of the expressions that appear in
  12160. representation clauses is implementation_dependent, for example,
  12161. expressions specifying addresses.  An implementation may limit its
  12162. acceptance of representation clauses to those that can be handled
  12163. simply by the underlying hardware.  If a representation clause is
  12164. accepted by an implementation, the compiler must guarantee that the
  12165. net effect of the program is not changed by the presence of the clause,
  12166. except for address clauses and for parts of the program that interrogate
  12167. representation attributes. If a program contains a representation clause
  12168. that is not accepted, the program is \villegal\v108..  For each implementation,
  12169. the allowed representation clauses, and the conventions used for
  12170. implementation-dependent expressions, must be documented in Appendix F of
  12171. the reference manual.
  12172. Whereas a representation clause is used to impose certain
  12173. characteristics of the mapping of an entity onto the underlying
  12174. machine, pragmas can be used to provide an implementation, with
  12175. criteria for its selection of such a mapping.  The pragma PACK
  12176. specifies that storage minimization should be the main criterion when
  12177. selecting the representation of a record or array type.  Its form is
  12178. as follows:
  12179.         pragma PACK (type_simple_name);
  12180. Packing means that gaps between the storage areas allocated to
  12181. consecutive \vcomponents\v305. should be minimized.  It need not, however,
  12182. affect the mapping of each component onto storage.  This mapping can
  12183. itself be influenced by a pragma (or controlled by a representation
  12184. clause) for the component or component type.  The position of a PACK
  12185. pragma, and the restrictions on the named type, are governed by the
  12186. same rules as for a representation clause; in particular, the pragma
  12187. must appear before any use of a representation attribute of the packed
  12188. entity.
  12189. The pragma PACK is the only language-defied representation pragma.
  12190. Additional representation pragmas may be provided by an
  12191. implementation; these must be documented in Appendix F. (in contrast
  12192. to representation clauses, a pragma that is not accepted by the
  12193. implementation is ignored).
  12194. Note:
  12195. No representation clause is allowed for a \vgeneric formal type\v1203..
  12196. :1302
  12197. 13.2 \uLength Clauses\n
  12198. A length clause specifies an amount of storage associated with a type.
  12199. length_clause ::= for \vattribute\v405. use simple_expression;
  12200. The \vexpression\v410. \vmust\v108. be of some \vnumeric type\v310. and is evaluated during the
  12201. \velaboration\v333. of the length clause (unless it is a \vstatic expression\v422.).  The
  12202. prefix of the attribute must denote either a type or a \vfirst named subtype\v321..
  12203. The prefix is called T in what follows.  The only allowed attribute
  12204. designators in a length clause are SIZE, STORAGE_SIZE, and SMALL.  The
  12205. effect of the length clause depends on the attribute designator:
  12206. (a)  Size specification: T'SIZE
  12207.      The expression must be a static expression of some \vinteger type\v314..  The
  12208.      value of the expression specifies an upper bound for the number of
  12209.      bits to be allocated to \vobjects\v302. of the type or first named subtype T.
  12210.      The size specification must \vallow\v108. for enough storage space to
  12211.      accommodate every allowable value of these objects. A size
  12212.      specification for a \vcomposite type\v305. may affect the size of the gaps
  12213.      between the storage areas allocated to consecutive components. On the
  12214.      other hand, it need not affect the size of the storage area allocated
  12215.      to each component.
  12216.      The size specification is only allowed if the \vconstraints\v305. on T and on
  12217.      its \vsubcomponents\v305. (if any) are static.  In the case of an
  12218.      unconstrained \varray type\v321., the \vindex subtypes\v321. must also be static.
  12219. (b)  Specification of \vcollection\v330. size: T'STORAGE_SIZE
  12220.      The prefix T must denote an \vaccess type\v330.. The expression must be of
  12221.      some integer type (but need not be static); its value specifies the
  12222.      number of \vstorage units\v1308. to be reserved for the collection, that is,
  12223.      the storage space needed to contain all objects \vdesignated\v330. by values
  12224.      of the access type and by values of other types derived form the
  12225.      access type, directly or indirectly.  This form of length clause is
  12226.      not allowed for a type derived from an access type.
  12227. (c)  Specification of storage for a \vtask activation\v903.: T'STORAGE _SIZE
  12228.      The prefix T must denote a \vtask type\v902..  The expression must be of some
  12229.      integer type (but need not be static); its value specifies the number
  12230.      of storage units to be reserved for an activation (not the code) of a
  12231.      task of the type.
  12232. (d)  Specification of small for a \vfixed point type\v319.: T'SMALL
  12233.      The prefix T must denote the first named subtype of a fixed point
  12234.      type. The expression must be a static expression of some \vreal type\v316.;
  12235.      its value must be greater than the delta of the first named subtype.
  12236.      The effect of the length clause is to use this value of small for the
  12237.      representation of values of the fixed point base type.  (The length
  12238.      clause thereby also affects the amount of storage for objects that
  12239.      have this type).
  12240. \uNotes:\n
  12241. A size specification is allowed for an access, task, or fixed point type,
  12242. whether or not another form of length clause is also given for the type.
  12243. What is considered to be part of the storage reserved for a collection or
  12244. for an activation of a \vtask\v900. is implementation-dependent.  The control
  12245. afforded by length clauses is therefore relative to the implementation
  12246. conventions.  For example, the language does not define whether the storage
  12247. reserved for an activation of a task includes any storage needed for the
  12248. collection associated with an access type declared within the task body.
  12249. Neither does it define the method of allocation for objects denoted by
  12250. values of an access type.  For example, the space allocated could be on a
  12251. stack; alternatively, a general dynamic aliocation scheme or fixed storage
  12252. could be used.
  12253. The objects allocated in a collection need not have the same size if the
  12254. designated type is an unconstrained array type or an unconstrained type
  12255. with discriminants.  Note also that the \vallocator\v421. itself may require some
  12256. space for internal tables and links.  Hence a length clause for the
  12257. collection of an access type does not always give precise control over the
  12258. maximum number of allocated objects.
  12259. \uExamples:\n
  12260.       --assumed declarations:
  12261.       \utype\n MEDIUM \uis range\n 0 .. 65000;
  12262.       \utype\n SHORT  \uis delta\n 0.01 \urange\n -100.0 .. 100.0;
  12263.       \utype\n DEGREE \uis delta\n 0.1  \urange\n -360.0 .. 360.0;
  12264.       BYTE  : \uconstant\n := 8;
  12265.       PAGE  : \uconstant\n := 2000;
  12266.       --length clauses:
  12267.       \ufor\n COLOR'SIZE  \uuse\n 1*BYTE; -- see 3.5.1
  12268.       \ufor\n MEDIUM'SIZE \uuse\n 2*BYTE;
  12269.       \ufor\n SHORT'SIZE  \uuse\n 15;
  12270.       \ufor\n CAR_NAME'STORAGE_SIZE \uuse\n -- approximately 2000 cars
  12271.               2000*((CAR'SIZE/SYSTEM.STORAGE_UNIT) +1);
  12272.       \ufor\n KEYBOARD_DRIVERS'STORAGE_SIZE \uuse\n 1*PAGE;
  12273. \ufor\n DEGREE'SMALL \uuse\n 360.0/2**(SYSTEM.STORAGE_UNIT -1);
  12274. Notes on the \uExamples:\n
  12275. In the length clause for SHORT, fifteen bits is the minimum necessary,
  12276. since the type definition requires SHORT'SMALL=2**(-7) and SHORT'MANTISSA =
  12277. 14.  The length clause for DEGREE forces the model numbers to exactly span
  12278. the range of the type.
  12279. :1303
  12280. 13.3 \uEnumeration Representation Clauses\n
  12281. An enumeration \vrepresentation clause\v1301. specifies the internal codes for the
  12282. \vliterals\v406. of the \venumeration type\v311. that is named in the clause.
  12283.       enumeration_representation_clause ::= for type_simple_name use
  12284.                \vaggregate\v407.;
  12285. The aggregate used to specify this mapping is written as a one-dimensional
  12286. aggregate, for which the \vindex subtype\v321. is the enumeration \vtype\v305. and the
  12287. component \vtype is universal_integer\v314..
  12288. All literals of the enumeration type must be provided with distinct integer
  12289. codes, and all \vchoices\v328.. and \vcomponent\v305. values given in the aggregate must be
  12290. static.  The integer codes specified for the enumeration type must satisfy
  12291. the predefined \vordering relation\v311. of the type.
  12292. Example:
  12293.       \utype\n MIX_CODE \uis\n (ADD, SUB, MUL, LDA, STA, STZ);
  12294.       \ufor\n MIX_CODE \uuse\n
  12295.          (ADD => 1, SUB =.2, MUL => 3, LDA => 8, STA => 24, STZ =>33);
  12296. \uNotes:\n
  12297. The attributes SUCC, PRED, and POS are defined even for enumeration types
  12298. with a noncontiguous representation; their definition corresponds to the
  12299. (logical) \vtype declaration\v306. and is not affected by the enumeration
  12300. representation clause.  In the example, because of the need to avoid the
  12301. omitted values, these \vfunctions\v609. are likely to be less efficiently
  12302. implemented than they could be in the absence of a representation clause.
  12303. Similar considerations apply when such types are used for indexing.
  12304. :1304
  12305. 13.4 \uRecord Representation Clauses\n
  12306. A record representation clause specifies the storage representation of
  12307. records, that is, the order, position, and size of \vrecord components\v325.
  12308. (including \vdiscriminants\v326., if any).
  12309.       record_representation_clause ::=
  12310.         \ufor\n type_simple_name \uuse\n
  12311.           \urecord\n [alignment_clause]
  12312.             {component clause}
  12313.           \uend record\n;
  12314.       alignment_clause ::= \uat mod\n static_simple_expression;
  12315.       component_clause ::=
  12316.         component_name at static_simple_expression \vrange\v310. static_range;
  12317. The \vsimple expression\v410. given after the reserved words at mod in an alignment
  12318. clause, or after the reserved word at in a component clause, \vmust\v108. be a
  12319. \vstatic expression\v422. of some \vinteger type\v314..  If the bounds of the range of a
  12320. component clause are defined by simple expressions, then each bound of the
  12321. range must be defined by a static expression of some integer type, but the
  12322. two bounds need not have the same integer type.
  12323. An alignment clause forces each record of the given type to be allocated at
  12324. a starting address that is a multiple of the value of the given expression
  12325. (that is, the address modulo the expression must be zero). An
  12326. implementation may place restrictions on the allowable alignments.
  12327. A component clause specifies the storage place of a component, relative to
  12328. the start of the record.  The integer defined by the static expression of a
  12329. component clause is a relative address expressed in \vstorage units\v1308..  The
  12330. range defines the bit positions of the storage place, relative to the
  12331. storage unit.  The first storage unit of a record is numbered zero.The
  12332. first bit of a storage unit is numbered zero.  The ordering of bits in a
  12333. storage unit is machine_dependent and may extend to adjacent storage units
  12334. (For a specific machine, the size in bits of a storage unit is given by the
  12335. configuration-dependent \vnamed number\v302. SYSTEM.STORAGE_UNIT.)  Whether a
  12336. component is allowed to overlap a storage boundary, and if so, how, is
  12337. implementation-defined.
  12338. At most one component clause is allowed for each component of the record
  12339. type, including for each discriminant (component clauses may be given for
  12340. some, all, or none of the components).  If no component clause is given for
  12341. a component, then the choice of the storage place for the component is left
  12342. to the compiler. If component clauses are given for all components, the
  12343. record representation clause completely specifies the representation of the
  12344. \vrecord type\v325. and must be obeyed exactly by the compiler.
  12345. Storage places within a record \vvariant\v328. must not overlap, but overlap of the
  12346. storage for distinct variants is allowed.  Each component clause must \vallow\v108.
  12347. for enough storage space to accommodate  every allowable value of the
  12348. component.  A component clause is only allowed for a component if any
  12349. \vconstraint\v305. on this component or on any of its \vsubcomponents\v305. is static.
  12350. An implementation may generate names that denote implementation-dependent
  12351. components (for example, one containing the offset of another component).
  12352. Such implementation-dependent names can be used in record representation
  12353. clauses (these names need not be \vsimple names\v401.; for example, they could be
  12354. implementation-dependent \vattributes\405.).
  12355. Example:
  12356.       WORD : \vconstant\v303. := 4;  --  storage unit is byte, 4 bytes per word
  12357. \utype\n STATE         \uis\n (A,M,W,P);
  12358. \utype\n MODE          \uis\n (FIX, DEC, EXP, SIGNIF);
  12359. \utype\n BYTE_MASK     \uis array\n (0.. 7) \uof\n BOOLEAN;
  12360. \utype\n STATE_MASK    \uis array\n (STATE) \uof\n BOOLEAN;
  12361. \utype\n MODE_MASK     \uis array\n (MODE)  \uof\n BOOLEAN;
  12362. \utype\n PROGRAM_STATUS_WORD \uis\n
  12363.   \urecord\n
  12364.       SYSTEM_MASK        : BYTE_MASK;
  12365.       PROTECTION_KEY     : INTEGER range 0 .. 3;
  12366.       MACHINE_STATE      : STATE_MASK;
  12367.       INTERRUPT_CAUSE    : INTERRUPTION_CODE;
  12368.       ILC                : INTEGER range 0 .. 3;
  12369.       CC                 : INTEGER range 0 .. 3;
  12370.       PROGRAM_MASK       : MODE_MASK;
  12371.       INST_ADDRESS       : ADDRESS;
  12372. \uend record\n;
  12373.   \ufor\n PROGRAM_STATUS_WORD \uuse\n
  12374.     \urecord at mod\n 8;
  12375.         SYSTEM_MASK      \uat\n 0*WORD \urange\n 0  .. 7;
  12376.         PROTECTION_KEY   \uat\n 0*WORD \urange\n 10 .. 11; -- bits 8,9 unused
  12377.         MACHINE_STATE    \uat\n 0*WORD \urange\n 12 .. 15;
  12378.         INTERRUPT_CAUSE  \uat\n 0*WORD \urange\n 16 .. 31;
  12379.         ILC              \uat\n 1*WORD \urange\n 0  .. 1;  -- second word
  12380.         CC               \uat\n 1*WORD \urange\n 2  .. 3;
  12381.         PROGRAM_MASK     \uat\n 1*WORD \urange\n 4  .. 7;
  12382.         INST_ADDRESS     \uat\n 1*WORD \urange\n 8  .. 31;
  12383.     \uend record\n;
  12384.   \ufor\n PROGRAM_STATUS_WORD'SIZE \uuse\n 8*SYSTEM.STORAGE_UNIT;
  12385. Note on the example:
  12386. The record representation clause defines the record layout.  The length
  12387. clause guarantees that exactly eight storage units are used.
  12388. :1305
  12389. 13.5 \uAddress Clauses\n
  12390. An address clause specifies a required address in storage for an \ventity\v301..
  12391.       address_clause ::= for simple_name use at simple_expression;
  12392. The \vexpression\v410. given after the \vreserved word\v211. at must be of the \vtype\v305. ADDRESS
  12393. defined in the \vpackage\v700. SYSTEM (see 13.7); this package must be named by a
  12394. \vwith clause\v1002. that applies to the \vcompilation unit\v1001. in which the address
  12395. clause occurs.  The conventions that define the interpretation of a value
  12396. of the type ADDRESS as an address, as an interrupt level, or whatever it
  12397. may be, are implementation-dependent.  The allowed nature of the simple
  12398. \vname\v401. and the meaning of the corresponding address are as follows:
  12399. (a) Name of an \vobject\v302.: the address is that required for the object
  12400.     (\vvariable\v303. or \vconstant\v303.).
  12401. (b) Name of a \vsubprogram\v600., package, or \vtask unit\v900.: the address is that
  12402.     required for the machine code associated with the body of the program
  12403.     unit.
  12404. (c) Name of a single \ventry\v905.: the address specifies a hardware interrupt to
  12405.     which the single entry is to be linked.
  12406. If the simple name is that of a single task, the address clause is
  12407. understood to refer to the task unit and not to the \vtask object\v901..  In all
  12408. cases, the address clause is only legal if exactly one declaration with
  12409. this identifier occurs earlier, immediately within the same declarative
  12410. part, package specification, or task specification.  A name declared by a
  12411. renaming declaration is not allowed as the \vsimple name\v401..
  12412. Address clauses should not be used to achieve overlays of objects or
  12413. overlays of \vprogram units\v600.. Nor should a given interrupt be linked to more
  12414. than one entry. Any program using address clauses to achieve such effects
  12415. is \verroneous\v108..
  12416. Example:
  12417.     \ufor\n CONTROL \uuse at\n 16#0020#; -- assuming that SYSTEM.ADDRESS is an
  12418.                                     integer type
  12419. \uNotes:\n
  12420. The above rules imply that if two subprograms overload each other and are
  12421. visible at a given point, an address clause for any of them is not legal at
  12422. this point.  Similarly if a task specification declares entries that
  12423. overload each other, they cannot be interrupt entries.  The syntax does not
  12424. allow an address clause for a \vlibrary unit\v1001..  An implementation may provide
  12425. \vpragmas\v210. for the specification of program overlays.
  12426. More details:
  12427.  13.5.1  \vInterrupts\v1306.
  12428. :1306
  12429. 13.5.1 \uInterrupts\n
  12430. An address clause given for an \ventry\v905. associates the entry with some device
  12431. that may cause an interrupt; such an entry is referred to in this section
  12432. as an interrupt entry.  If control information is supplied upon an
  12433. interrupt, it is passed to an associated interrupt entry as one or more
  12434. parameters of \vmode\v601. in; only parameters of this mode are \vallowed\v108..
  12435. An interrupt acts as an entry call issued by a hardware \vtask\v900. whose priority
  12436. is higher than the priority of the main program, and also higher than the
  12437. priority of any user-defined task (that is, any task whose type is declared
  12438. by a task unit in the program).  The entry call may be an ordinary entry
  12439. call, a \vtimed entry call\v910., or a \vconditional entry call\v909., depending on the
  12440. kind of interrupt and on the implementation.
  12441. If a \vselect statement\v907. contains both a \vterminate alternative\v908. and an \vaccept\v908.
  12442. \valternative\v908. for an interrupt entry, then an implementation may impose
  12443. further requirements for the selection of the terminate alternative in
  12444. addition to those given in section 9.4.
  12445. Example:
  12446.       \utask\n INTERRUPT_HANDLER \uis\n
  12447.         \uentry\n DONE;
  12448.         \ufor\n DONE \uuse at\n 16#40#; assuming that SYSTEM.ADDRESS is an integer
  12449.                                 type
  12450.         \uend\n INTERRUPT_HANDLER;
  12451. \uNotes:\n
  12452. Interrupt entry calls need only have the semantics described above; they
  12453. may be implemented by having the hardware directly execute the appropriate
  12454. accept statements.
  12455. Queued interrupts correspond to ordinary entry calls. Interrupts that are
  12456. lost if not immediately processed correspond to conditional entry calls. It
  12457. is a consequence of the priority rules that an \vaccept statement\v905. executed in
  12458. response to an interrupt takes precedence over ordinary, user-defined
  12459. tasks, and can be executed without first invoking a scheduling action.
  12460. One of the possible effects of an address clause for an interrupt entry is
  12461. to specify the priority of the interrupt (directly or indirectly).  Direct
  12462. calls to an interrupt entry are allowed.
  12463. :1307
  12464. 13.6  \uChange of Representation\n
  12465. At most one \vrepresentation clause\v1301. is allowed for a given \vtype\v305. and a given
  12466. aspect of its representation. Hence, if an alternative representation is
  12467. needed, it is necessary to declare a second type, \vderived\v309. from the first,
  12468. and to specify a different representation for the second type.
  12469. Example:
  12470.   -- PACKED_DESCRIPTOR and DESCRIPTOR are two different types
  12471.   -- with identical characteristics, apart from their representation
  12472.   \utype\n DESCRIPTOR \uis\n
  12473.       \urecord\n
  12474.         -- components of a descriptor
  12475.       \uend record\n;
  12476.   \utype\n PACKED_DESCRIPTOR \uis new\n DESCRIPTOR;
  12477.   \ufor\n PACKED_DESCRIPTOR \uuse\n
  12478.       \urecord\n
  12479.         -- component clauses for some or for all components
  12480.       \uend record\n;
  12481. Change of representation can now be accomplished by \vassignment\v502. with
  12482. explicit \vtype conversions\v419.:
  12483.       D : DESCRIPTOR;
  12484.       P : PACKED_DESCRIPTOR;
  12485.       P := PACKED_DESCRIPTOR (D); -- pack D
  12486.       D := DESCRIPTOR(P);         -- unpack P
  12487. :1308
  12488. 13.7 \uThe Package System\n
  12489. For each implementation there is a predefined library \vpackage\v700. called SYSTEM
  12490. which includes the definitions of certain configuration-dependent
  12491. characteristics.  The specification of the package SYSTEM is
  12492. implementation-dependent and \vmust\v108. be given in Appendix F.  The visible part
  12493. of this package must contain at least the following declarations.
  12494. package SYSTEM is
  12495.       \vtype\v305. ADDRESS  \uis\n implementation_defined;
  12496.       \utype\n NAME     \uis\n implementation_defined_enumeration_type;
  12497.       SYSTEM_NAME    : \uconstant\n NAME  := implementation_defined;
  12498.       STORAGE_UNIT   : \uconstant\n := implementation_defined;
  12499.       MEMORY_SIZE    : \uconstant\n := implementation_defined;
  12500.       --System-Dependent \vNamed Numbers\v302.:
  12501.       MIN_INT        : \uconstant\n := implementation_defined;
  12502.       MAX_INT        : \uconstant\n := implementation_defined;
  12503.       MAX_DIGITS     : \uconstant\n := implementation_defined;
  12504.       MAX_MANTISSA   : \uconstant\n := implementation_defined;
  12505.       FINE_DELTA     : \uconstant\n := implementation_defined;
  12506.       TICK           : \uconstant\n := implementation_defined;
  12507.       --Other System_Dependent Declarations
  12508.       \usubtype\n PRIORITY \uis\n INTEGER \urange\n implementation_defined;
  12509.       ...
  12510.   \uend\n SYSTEM;
  12511. The type ADDRESS is the type of the addresses provided in \vaddress clauses\v1305.;
  12512. it is also the type of the result delivered by the \vattribute\v405. ADDRESS.
  12513. Values of the enumeration type NAME are the names of alternative machine
  12514. configurations handled by the implementation; one of these is the constant
  12515. SYSTEM_NAME.  The named number STORAGE_UNIT is the number of bits per
  12516. storage unit; the named number MEMORY_SIZE is the number of available
  12517. storage units in the configuration; these named numbers are of the type
  12518. universal_integer.
  12519. An alternative form of the package SYSTEM, with given values for any of
  12520. SYSTEM_NAME, STORAGE_UNIT, and MEMORY_SIZE, can be obtained by means of the
  12521. corresponding \vpragmas\v210..  These pragmas are only allowed at the start of a
  12522. compilation, before the first \vcompilation unit\v1001. (if any) of the compilation.
  12523.       \upragma\n SYSTEM_NAME (enumeration_literal);
  12524. The effect of the above pragma is to use the enumeration literal with the
  12525. specified identifier for the definition of the constant SYSTEM_NAME. This
  12526. pragma is only allowed if the specified identifier corresponds to one of
  12527. the literals of the type NAME.
  12528.       \upragma\n STORAGE_UNIT (\vnumeric_literal\v204.);
  12529. The effect of the above pragma is to use the value of the specified numeric
  12530. literal for the definition of the named number STORAGE_UNIT.
  12531.       \upragma\n MEMORY_SIZE (numeric_literal);
  12532. The effect of the above pragma is to use the value of the specified numeric
  12533. literal for the definition of the named number MEMORY_SIZE.
  12534. The compilation of any of these pragmas causes an implicit recompilation of
  12535. the package SYSTEM.  Consequently any compilation unit that names SYSTEM in
  12536. its context clause becomes obsolete after this implicit recompilation. An
  12537. implementation may impose further limitations on the use of these pragmas.
  12538. For example, an implementation may allow them only at the start of the
  12539. first compilation, when creating a new \vprogram library\v1001..
  12540. Note:
  12541. It is a consequence of the \vvisibility\v803. rules that a declaration given in the
  12542. package SYSTEM is not visible in a compilation unit unless this package is
  12543. mentioned by a \vwith clause\v1002. that applies (directly or indirectly) to the
  12544. compilation unit.
  12545. More details:
  12546.  13.7.1  \vSystem Dependent Named Numbers\v1309.
  12547.  13.7.2  \vRepresentation Attributes\v1310.
  12548.  13.7.3  \vRepresentation Attributes of Real Types\v1311.
  12549. :1309
  12550. 13.7.1 \uSystem-dependent Named Numbers\n
  12551. Within the \vpackage SYSTEM\v1308., the following \vnamed numbers\v302. are declared.  The
  12552. numbers FINE_DELTA and TICK are of the \vtype\v305. \vuniversal_real\v316.; the others are
  12553. of the type \vuniversal_integer\v314..
  12554. MIN_INT      The smallest (most negative) value of all predefined integer
  12555.              types.
  12556. MAX_INT      The largest (most positive) value of all predefined \vinteger\v314.
  12557.              \vtypes\v314..
  12558. MAX_DIGITS   The largest value \vallowed\v108. for the number of significant
  12559.              decimal digits in a \vfloating point constraint\v317..
  12560. MAX_MANTISSA The largest possible number of binary digits in the mantissa
  12561.              of \vmodel numbers\v316. of a fixed point subtype.
  12562. FINE_DELTA   The smallest delta allowed in a \vfixed point constraint\v319. that
  12563.              has the \vrange constraint\v310. -1.0 .. 1.0.
  12564. TICK         The basic clock period, in seconds.
  12565. :1310
  12566. 13.7.2 \uRepresentation Attributes\n
  12567. The values of certain implementation-dependent characteristics can be
  12568. obtatined by interrogating appropriate representation attributes.  These
  12569. attributes are described below.
  12570. For any \vobject\v302., \vprogram unit\v600., \vlabel\v501., or \ventry\v905. X:
  12571. X'ADDRESS      Yields the address of the first of the \vstorage units\v1308.
  12572.                allocated to X.  For a \vsubprogram\v600., \vpackage\v700., \vtask unit\v900. or
  12573.                label, this value refers to the machine code associated with
  12574.                the corresponding body or \vstatement\v500..  For an entry for which
  12575.                an \vaddress clause\v1305. has been given, the value refers to the
  12576.                corresponding hardware interrupt. The value of this
  12577.                attribute is of the \vtype\v305. ADDRESS defined in the package
  12578.                SYSTEM.
  12579. For any type or \vsubtype\v305. X or for any object X:
  12580. X'SIZE         Applied to an object, yields the number of bits allocated to
  12581.                hold the object.  Applied to a type or subtype, yields the
  12582.                minimum number of bits that is needed by the implementation
  12583.                to hold any possible object of this type or subtype. The
  12584.                value of this attribute is of the type \vuniversal_integer\v314..
  12585. For the above two representation attributes, if the prefix is the name of a
  12586. function, the attribute is understood to be an attribute of the function
  12587. (not of the result of calling the function).  Similarly, if the type of the
  12588. prefix is an \vaccess type\v330., the attribute is understood to be an attribute of
  12589. the prefix (not of the designated object: attributes of the latter can be
  12590. written with a prefix ending with the reserved word \uall\n).
  12591. For any \vcomponent\v305. C of a \vrecord object\v325. R:
  12592. R.C'POSITION   Yields the offset, from the start of the first storage unit
  12593.                occupied by the record, of the first of the storage units
  12594.                occupied by C.  This offset is measured in storage units.
  12595.                The value of this attribute is of the type
  12596.                universal_integer.
  12597. R.C'FIRST_BIT  Yields the offset, from the start of the first of the
  12598.                storage units occupied by C, of the last bit occupied by C.
  12599.                This offset is measured in bits.  The value of this
  12600.                attribute is of the type universal_integer.
  12601. R.C'LAST_BIT   Yields the offset, from the start of the first of the
  12602.                storage units occupied by C, of the last bit occupied by C.
  12603.                This offset is measured in bits. The value of this attribute
  12604.                is of the type universal_integer.
  12605. For any \vaccess type or subtype\v330. T:
  12606. T'STORAGE_SIZE Yields the total number of storage units reserved for the
  12607.                \vcollection\v330. associated with the \vbase type\v305. of T.  The value of
  12608.                this attribute is of the type universal_integer.
  12609. For any \vtask type\v902. or \vtask object\v902. T:
  12610. T'STORAGE_SIZE Yields the number of storage units reserved for each
  12611.                \vactivation\v903. of a task of the type T or for the activation of
  12612.                the task object T.  The value of this attribute is of the
  12613.                type universal_integer.
  12614. \uNotes:\n
  12615. For a task object X, the attribute X'SIZE gives the number of bits used to
  12616. hold the object X, whereas X'STORAGE_SIZE gives the number of storage units
  12617. allocated for the activation of the task designated by X.  For a \vformal\v601.
  12618. \vparameter\v601. X, if \vparameter passing\v602. is achieved by copy, then the attribute
  12619. X'ADDRESS yields the address of the local copy; if parameter passing is by
  12620. reference, then the address is that of the \vactual parameter\v602..
  12621. :1311
  12622. 13.7.3 \uRepresentation Attributes of Real Types\n
  12623. For every \vreal type\v316. or \vsubtype\v305. T, the following machine-dependent
  12624. \vattributes\v405. are defined, which are not related to the \vmodel numbers\v316..
  12625. Programs using these attributes may thereby exploit properties that go
  12626. beyond the minimal properties associated with the \vnumeric type\v310. (see section
  12627. 4.5.7 for the rules defining the accuracy of operations with real
  12628. operands). Precautions must therefore be taken when using these machine-
  12629. dependent attributes if portability is to be ensured.
  12630. For both \vfloating point\v317. and \vfixed point types\v319.:
  12631. T'MACHINE_ROUNDS    Yields the value TRUE if every predefined arithmetic
  12632.                     operation on values of the \vbase type\v305. of T either
  12633.                     returns an exact result or performs rounding; yields
  12634.                     the value FALSE otherwise.  The value of this attribute
  12635.                     is of the predefined type \vBOOLEAN\v313..
  12636. T'MACHINE_OVERFLOWS Yields the value TRUE if every \vpredefined operation\v308. on
  12637.                     values of the base type of T either provides a correct
  12638.                     result, or raises the exception \vNUMERIC_ERROR\v1101. in
  12639.                     overflow situations (see 4.5.7); yields the value FALSE
  12640.                     otherwise. The value of this attribute is of the
  12641.                     predefined type BOOLEAN.
  12642. For floating point types, the following attributes provide characteristics
  12643. of the underlying machine representation, in terms of the canonical form
  12644. defined in section 3.5.7:
  12645. T'MACHINE_RADIX     Yields the value of the \vradix\v317. used by the machine
  12646.                     representation of the base type of T (the digits are
  12647.                     extended digits in the range 0 to T'MACHINE_RADIX -1).
  12648.                     The value of this attribute is of the type
  12649.                     universal_integer.
  12650. T'MACHINE_EMAX      Yields the largest value of exponent for the machine
  12651.                     representation of the base type of T.  The value of
  12652.                     this attribute is of the type universal_integer.
  12653. T'MACHINE_EMIN      Yields the smallest (most negative) value of exponent
  12654.                     for the machine representation of the base type of T.
  12655.                     The value of this attribute is of the type
  12656.                     universal_integer.
  12657. Note: For many machines the largest machine representable number of type F
  12658. is almost
  12659.       (F'MACHINE_RADIX)**(F'MACHINE_EMAX),
  12660. and the smallest positive representable number is
  12661.       F'MACHINE_RADIX ** (F'MACHINE_EMIN -1)
  12662. :1312
  12663. 13.8 \uMachine Code Insertions\n
  12664. A machine code insertion can be achieved by a call to a \vprocedure\v600. whose
  12665. \vsequence of statements\v501. contains code \vstatements\v500..
  12666.       code_statement ::= type_mark'record_aggregate;
  12667. A code statement is only \vallowed\v108. in the sequence of statements of a
  12668. \vprocedure body\v603..  If a procedure body contains code statements, then within
  12669. this procedure body the only allowed form of statement is a code statement
  12670. (\vlabeled\v501. or not), the only allowed \vdeclarative items\v333. are \vuse clauses\v505., and
  12671. no \vexception handler\v1102. is allowed (\vcomments\v209. and \vpragmas\v210. are allowed as
  12672. usual).
  12673. Each machine instruction appears as a record aggregate of a \vrecord type\v325.
  12674. that defines the corresponding instruction.  The base type of the type mark
  12675. of a code statement must be declared within the predefined library \vpackage\v700.
  12676. called MACHINE_CODE; this package must be named by a \vwith clause\v1002. that
  12677. applies to the \vcompilation unit\v1001. in which the code statement occurs.  An
  12678. implementation is not required to provide such a package.
  12679. An implementation is allowed to impose further restrictions on the \vrecord\v408.
  12680. \vaggregates\v408. allowed in code statements.  For example, it may require that
  12681. expressions contained in such aggregates be \vstatic expressions\v422..
  12682. An implementation may provide machine-dependent pragmas specifying register
  12683. conventions and calling conventions.  Such pragmas must be documented in
  12684. Appendix F
  12685. Example:
  12686.       M : MASK
  12687.       \uprocedure\n SET_MASK; \upragma\n INLINE(SET_MASK);
  12688.       \uprocedure\n SET_MASK \uis\n
  12689.         \uuse\n MACHINE_CODE;
  12690.       \ubegin\n
  12691.         SI_FORMAT'(CODE => SSM, B => M'BASE_REG, D => M'DISP);
  12692.         --  M'BASE_REG and M'DISP are implementation-specific predefined
  12693.             attributes
  12694.       \uend\n;
  12695. :1313
  12696. 13.9 \uInterface to Other Languages\n
  12697. A subprogram written in another language can be called from an Ada program
  12698. provided that all communication is achieved via parameters and function
  12699. results. A \vpragma\v210. of the form
  12700.       \upragma\n INTERFACE (language_name, subprogram_name);
  12701. \vmust\v108. be given for each such \vsubprogram\v600.; a subprogram \vname\v401. is \vallowed\v108. to
  12702. stand for several \voverloaded subprograms\v610..  This pragma is allowed at the
  12703. place of a \vdeclarative item\v333., and must apply in this case to a subprogram
  12704. declared by an earlier declarative item of the same \vdeclarative part\v333. or
  12705. \vpackage specification\v701..  The pragma is also allowed for a \vlibrary unit\v1001.; in
  12706. this case the pragma must appear after the subprogram \vdeclaration\v301., and
  12707. before any subsequent \vcompilation unit\v1001..  The pragma specifies the other
  12708. language (and therby the calling conventions ) and informs the compiler
  12709. that an object module will be supplied for the corresponding subprogram.  A
  12710. body is not allowed for such a subprogram (not even in the form of a body
  12711. stub) since the instructions of the subprogram are written in another
  12712. language.
  12713. This capability need not be provided by all implementations.  An
  12714. implementation may place restrictions on the allowable forms and places of
  12715. parameters and calls.
  12716. Example:
  12717.       \upackage\n FORT_LIB \uis\n
  12718.         \ufunction\n SQRT (X : FLOAT) \ureturn\n FLOAT;
  12719.         \ufunction\n EXP  (X : FLOAT) \ureturn\n FLOAT;
  12720.       \uprivate\n
  12721.         \upragma\n INTERFACE(FORTRAN, SQRT);
  12722.         \upragma\n INTERFACE(FORTRAN, EXP);
  12723.       \uend\n FORT_LIB;
  12724. \uNotes:\n
  12725. The conventions used by other language processors that call Ada programs
  12726. are not part of the Ada language definition.  Such conventions must be
  12727. defined by these other language processors.
  12728. The pragma INTERFACE is not defined for generic subprograms.
  12729. :1314
  12730. 13.10 \uUnchecked Programming\n
  12731. The predefined generic library subprograms UNCHECKED_DEALLOCATION and
  12732. UNCHECKED_CONVERSION are used for unchecked storage deallocation and for
  12733. unchecked \vtype\v305. conversions.
  12734.       generic
  12735.          \utype\n OBJECT \uis limited private\n;
  12736.          \utype\n NAME   \uis access\n  OBJECT;
  12737.       \uprocedure\n UNCHECKED_DEALLOCATION(X: \uin out\n NAME);
  12738.       generic
  12739.          \utype\n SOURCE \uis limited private\n;
  12740.          \utype\n TARGET \uis limited private\n;
  12741.       \ufunction\n UNCHECKED_CONVERSION(S : SOURCE) \ureturn\n TARGET;
  12742. More details:
  12743.  13.10.1 \vUnchecked Storage Deallocation\v1315.
  12744.  13.10.2 \vUnchecked Type Conversions\v1316.
  12745. :1315
  12746. 13.10.1 \uUnchecked Storage Deallocation\n
  12747. Unchecked storage deallocation of an object \vdesignated\v330. by a value of an
  12748. \vaccess type\v330. is achieved by a call of a \vprocedure\v600. that is obtained by
  12749. instantiation of the \vgeneric procedure\v1201. UNCHECKED_DEALLOCATION.  For
  12750. example:
  12751.       \uprocedure\n FREE \uis new\n UNCHECKED_DEALLOCATION(object_type_name,
  12752.              access_type_name);
  12753. Such a FREE procedure has the following effect:
  12754. (a)  after executing FREE(X), the value of X is null;
  12755. (b) FREE(X), when X is already equal to null, has no effect;
  12756. (c) FREE(X), when X is not equal to null, is an indication that the \vobject\v302.
  12757.     designated by X is no longer required, and that the storage it occupies
  12758.     is to be reclaimed.
  12759. If X and Y designate the same object, then accessing this object through Y
  12760. is \verroneous\v108. if this access is performed (or attempted) after the call
  12761. FREE(X); the efeect of each such access is not defined by the language.
  12762. \uNotes:\n
  12763. It is a consequence of the \vvisibility\v803. rules that the generic procedure
  12764. UNCHECKED_DEALLOCATION is not visible in a \vcompilation unit\v1001. unless this
  12765. generic procedure is mentioned by a \vwith clause\v1002. that applies to the
  12766. compilation unit.
  12767. If X designates a \vtask object\902., the call FREE(X); has no effect on the \vtask\v900.
  12768. designated by the value of this task object.  The same holds for any
  12769. \vsubcomponent\v305. of the object designated by X, if this subcomponent is a task
  12770. object.
  12771. :1316
  12772. 13.10.2 \uUnchecked Type Conversions\n
  12773. An unchecked type conversion can be achieved by a call of a function that
  12774. is obtained by \vinstantiation\v1206. of the \vgeneric function\v1201. UNCHECKED_CONVERSION.
  12775. The effect of an unchecked conversion is to return the (uninterpreted)
  12776. parameter value as a value of the target \vtype\v305., that is, the bit pattern
  12777. defining the source value is returned unchanged as the bit pattern defining
  12778. a value of the target type.  An implementation may place restrictions on
  12779. unchecked conversions, for example, restrictions dependeing on the
  12780. respective sizes of objects of the source and target type. Such
  12781. restrictions must be documented in appendix F.
  12782. Whenever unchecked conversions are used, it is the programmer's
  12783. responsibility to ensure that these conversions maintain the properties
  12784. that are guaranteed by the language for objects of the target type.
  12785. Programs that violate these properties by means of unchecked conversions
  12786. are \verroneous\v108..
  12787. Note:
  12788. It is a consequence of the visibility rules that the generic function
  12789. UNCHECKED_CONVERSION is not visible in a \vcompilation unit\v1001. unless this
  12790. generic function is mentioned by a \vwith clause\v1001. that applies to the
  12791. compilation unit.
  12792. :1400
  12793. 14. \uInput-Output\n
  12794. Input-output  is  provided in the language by means of predefined packages.
  12795. The  generic  packages  \vSEQUENTIAL_IO\v1402.  and  \vDIRECT_IO\v1402.  define  input-output
  12796. operations  applicable  to  files  containing  elements  of  a  given type.
  12797. Additional operations for text input-output are  supplied  in  the  \vpackage\v1408.
  12798. \vTEXT_IO\v1408..   The  \vpackage  IO_EXCEPTIONS\v1420. defines the exceptions needed by the
  12799. above three packages.  Finally, a  \vpackage  LOW_LEVEL_IO\v1421.  is  provided  for
  12800. direct control of peripheral devices.
  12801. More details:
  12802.  14.1    \vExternal Files and File Objects\v1401.
  12803.  14.2    \vSequential and Direct Files\v1402.
  12804.  14.3    \vText Input-Output\v1408.
  12805.  14.4    \vExceptions in Input-Output\v1419.
  12806.  14.5    \vSpecification of the Package IO_EXCEPTIONS\v1420.
  12807.  14.6    \vLow Level Input-Output\v1421.
  12808.  14.7    \vExample of Input-Output\v1422.
  12809. :1401
  12810. 14.1  \uExternal Files and File Objects\n
  12811. Values input from the external environment of the program, or output to the
  12812. environment, are considered to occupy external files.  An external file can
  12813. be  anything external to the program that can produce a value to be read or
  12814. receive a value to be written.  An external file is identified by a  \vstring\v324.
  12815. (the  name).   A  second  string  (the form) gives further system-dependent
  12816. characteristics that may be associated with the file, such as the  physical
  12817. organization   or   access   rights.    The   conventions   governing   the
  12818. interpretation of such strings must be documented in Appendix F.
  12819. Input and output operations are expressed as operations on objects of  some
  12820. file  type,  rather  than  directly in terms of the external files.  In the
  12821. remainder of this chapter, the term file is always used to refer to a  file
  12822. object;   the term external file is used otherwise.  The values transferred
  12823. for a given file must all be of one type.
  12824. Input-output for \vsequential files\v1402. of values of a  single  element  type  is
  12825. defined  by  means  of  the generic package SEQUENTIAL_IO.  The skeleton of
  12826. this package is given below.
  12827.     \uwith\n IO_EXCEPTIONS;
  12828.     \ugeneric\n
  12829.        \utype\n ELEMENT_TYPE \uis private\n;
  12830.     \vpackage SEQUENTIAL_IO\v1402. \uis\n
  12831.        \utype\n FILE_TYPE \uis limited private\n;
  12832.        \utype\n \vFILE_MODE\v1405. \uis\n (IN_FILE, OUT_FILE);
  12833.        ...
  12834.        \vprocedure OPEN\v1403. (FILE : \uin out\n FILE_TYPE; ...);
  12835.        ...
  12836.        \vprocedure READ\v1406. (FILE : \uin\n FILE_TYPE; ITEM : \uout\n ELEMENT_TYPE);
  12837.        \vprocedure WRITE\v1406.(FILE : \uin\n FILE_TYPE; ITEM : \uin\n ELEMENT_TYPE);
  12838.        ...
  12839.     \uend\n SEQUENTIAL_IO;
  12840. In order to define \vsequential input-output\v1404. for a  given  element  type,  an
  12841. instantiation  of  this  generic  unit,  with  the  given  type  as  actual
  12842. parameter,  must  be  declared.   The  resulting   package   contains   the
  12843. declaration  of  a file type (called FILE_TYPE) for files of such elements,
  12844. as well as the operations applicable to these  files,  such  as  the  OPEN,
  12845. READ, and WRITE procedures.
  12846. Input-output  for  \vdirect  access\v1402.  files  is  likewise defined by a generic
  12847. package called \vDIRECT_IO\v1402..  Input-output in human-readable form  is  defined
  12848. by the (nongeneric) \vpackage TEXT_IO\v1408..
  12849. Before \vinput\v1404. or \voutput\v1404. operations can be performed on a file, the file must
  12850. first be associated with an external file.  While such an association is in
  12851. effect,  the  file is said to be open, and otherwise the file is said to be
  12852. closed.
  12853. The language does not define what  happens  to  external  files  after  the
  12854. completion  of the main program (in particular, if corresponding files have
  12855. not  been  closed).   The  effect  of  input-output  for  access  types  is
  12856. implementation-dependent.
  12857. An open file has a current mode, which is a value of one of the \venumeration\v311.
  12858. \vtypes\v311.
  12859.  \utype\n FILE_MODE \uis\n (IN_FILE, INOUT_FILE, OUT_FILE);  --  for DIRECT_IO
  12860.  \utype\n FILE_MODE \uis\n (IN_FILE, OUT_FILE);   --  for SEQUENTIAL_IO and TEXT_IO
  12861. These  values correspond respectively to the cases where only reading, both
  12862. reading and writing, or only writing are to be performed.  The  mode  of  a
  12863. file can be changed.
  12864. Several  file  management  operations  are common to the three input-output
  12865. packages.  These operations are described in section 14.2.1 for  sequential
  12866. and  \vdirect files\v1402..  Any additional effects concerning text input-output are
  12867. described in section 14.3.1.
  12868. The \vexceptions\v1100. that can be raised by a call of an  input-output  subprogram
  12869. are  all  defined  in  the  \vpackage IO_EXCEPTIONS\v1420.;  the situations in which
  12870. they can be raised are described, either following the description  of  the
  12871. subprogram  (and  in  section  14.4), or in Appendix F in the case of error
  12872. situations that are implementation-dependent.
  12873. \uNotes:\n
  12874. Each instantiation of the  generic  packages  SEQUENTIAL_IO  and  DIRECT_IO
  12875. declares  a  different  type  FILE_TYPE;   in the case of TEXT_IO, the type
  12876. FILE_TYPE is unique.
  12877. A bidirectional device  can  often  be  modeled  as  two  sequential  files
  12878. associated  with the device, one of mode IN_FILE, and one of mode OUT_FILE.
  12879. An implementation may restrict the number of files that may  be  associated
  12880. with a given external file.  The effect of sharing an external file in this
  12881. way by several file objects is implementation-dependent.
  12882. :1402
  12883. 14.2  \uSequential and Direct Files\n
  12884. Two  kinds  of access to external files are defined:  sequential access and
  12885. direct access.  The corresponding file types and the associated  operations
  12886. are  provided  by the generic packages SEQUENTIAL_IO and DIRECT_IO.  A file
  12887. object to be used for sequential access is called a  sequential  file,  and
  12888. one to be used for direct access is called a direct file.
  12889. For  sequential access, the file is viewed as a sequence of values that are
  12890. transferred in the order of their appearance (as produced by the program or
  12891. by the environment).  When the file is opened,  transfer  starts  from  the
  12892. beginning of the file.
  12893. For  direct  access,  the  file  is  viewed  as a set of elements occupying
  12894. consecutive positions in linear order;  a value can be  transferred  to  or
  12895. from  an  element of the file at any selected position.  The position of an
  12896. element is specified by its index, which is a number, greater than zero, of
  12897. the implementation-defined integer type \vCOUNT\v1408..  The first element, if  any,
  12898. has  index  one;   the  index  of  the  last element, if any, is called the
  12899. current size;  the current size is zero if  there  are  no  elements.   The
  12900. current size is a property of the external file.
  12901. An  open  direct  file has a current index, which is the index that will be
  12902. used by the next read or write operation.  When a direct  file  is  opened,
  12903. the  current  index is set to one.  The current index of a direct file is a
  12904. property of a file object, not of an external file.
  12905. All three \vfile modes\v1401. are allowed for direct files.  The only allowed  modes
  12906. for sequential files are the modes \vIN_FILE\v1401. and \vOUT_FILE\v1401..
  12907. More details:
  12908.  14.2.1  \vFile Management\v1403.
  12909.  14.2.2  \vSequential Input-Output\v1404.
  12910.  14.2.3  \vSpecification of the Package Sequential_IO\v1405.
  12911.  14.2.4  \vDirect Input-Output\v1406.
  12912.  14.2.5  \vSpecification of the Package Direct_IO\v1407.
  12913. :1403
  12914. 14.2.1  \uFile Management\n
  12915. The  procedures  and  functions  described  in this section provide for the
  12916. control of \vexternal files\v1401.;  their declarations are repeated in each of  the
  12917. three  packages  for  sequential,  direct, and text input-output.  For text
  12918. input-output, the  procedures  CREATE,  OPEN,  and  RESET  have  additional
  12919. effects described in section 14.3.1.
  12920.     \uprocedure\n CREATE(FILE : \uin out\n \vFILE_TYPE\v1401.;
  12921.                      \vMODE\v1401. : \uin\n \vFILE_MODE\v1401. := default_mode;
  12922.                      \vNAME\v1401. : \uin\n STRING := "";
  12923.                      FORM : \uin\n STRING := "");
  12924.           Establishes  a  new  external file, with the given name and form,
  12925.           and associates this external file with the given \vfile\v1401..  The given
  12926.           file is left open.  The \vcurrent mode\v1401. of the given file is set  to
  12927.           the  given  access  mode.   The  default  access mode is the mode
  12928.           \vOUT_FILE\v1401. for sequential and text input-output;  it  is  the  mode
  12929.           \vINOUT_FILE\v1406.  for direct input-output.  For \vdirect access\v1402., the size
  12930.           of the created file is implementation-dependent.  A  null  string
  12931.           for  NAME specifies an external file that is not accessible after
  12932.           the completion of the main program (a temporary  file).   A  null
  12933.           string  for  FORM specifies the use of the default options of the
  12934.           implementation for the external file.
  12935.           The \vexception STATUS_ERROR\v1419. is raised if the given file is already
  12936.           \vopen\v1401..  The \vexception NAME_ERROR\v1419. is raised if the string given  as
  12937.           NAME  does not allow the identification of an external file.  The
  12938.           \vexception USE_ERROR\v1419. is raised if, for  the  specified  mode,  the
  12939.           environment  does  not  support creation of an external file with
  12940.           the given name (in the absence of NAME_ERROR) and form.
  12941.     \uprocedure\n OPEN(FILE : \uin out\n FILE_TYPE;
  12942.                    MODE : \uin\n FILE_MODE;
  12943.                    NAME : \uin\n STRING;
  12944.                    FORM : \uin\n STRING := "");
  12945.           Associates the given file with an existing external  file  having
  12946.           the  given  name and form, and sets the current mode of the given
  12947.           file to the given mode.  The given file is left open.
  12948.           The exception STATUS_ERROR is raised if the given file is already
  12949.           open.  The exception NAME_ERROR is raised if the string given  as
  12950.           NAME  does  not allow the identification of an external file;  in
  12951.           particular, this exception is raised if no external file with the
  12952.           given name exists.  The exception USE_ERROR is raised if, for the
  12953.           specified mode, the environment does not support opening  for  an
  12954.           external  file with the given name (in the absence of NAME_ERROR)
  12955.           and form.
  12956.     \uprocedure\n CLOSE(FILE : \uin out\n FILE_TYPE);
  12957.           Severs the association between the given file and its  associated
  12958.           external file.  The given file is left closed.
  12959.           The  exception  STATUS_ERROR  is  raised if the given file is not
  12960.           open.
  12961.     \uprocedure\n DELETE(FILE : \uin out\n FILE_TYPE);
  12962.           Deletes the external file associated with the  given  file.   The
  12963.           given \vfile is closed\v1401., and the external file ceases to exist.
  12964.           The  exception  STATUS_ERROR  is  raised if the given file is not
  12965.           open.  The exception USE_ERROR is raised if (as fully defined  in
  12966.           Appendix F) deletion of the external file is not supported by the
  12967.           environment.
  12968.     \uprocedure\n RESET(FILE : \uin out\n FILE_TYPE; MODE : \uin\n FILE_MODE);
  12969.     \uprocedure\n RESET(FILE : \uin out\n FILE_TYPE);
  12970.           Resets  the  given  file  so  that reading from or writing to its
  12971.           elements can be restarted from the beginning  of  the  file;   in
  12972.           particular,  for  direct access this means that the current index
  12973.           is set to one.  If a MODE parameter is supplied, the current mode
  12974.           of the given file is set to the given mode.
  12975.           The exception STATUS_ERROR is raised if the  file  is  not  open.
  12976.           The  exception  USE_ERROR  is  raised if the environment does not
  12977.           support resetting  for  the  external  file  and,  also,  if  the
  12978.           environment  does not support resetting to the specified mode for
  12979.           the external file.
  12980.     \ufunction\n MODE(FILE : \uin\n FILE_TYPE) \ureturn\n FILE_MODE;
  12981.           Returns the current mode of the given file.
  12982.           The exception STATUS_ERROR is raised if the file is not open.
  12983.     \ufunction\n NAME(FILE : \uin\n FILE_TYPE) \ureturn\n STRING;
  12984.           Returns a string which  uniquely  identifies  the  external  file
  12985.           currently associated with the given file (and may thus be used in
  12986.           an   OPEN  operation).   If  an  environment  allows  alternative
  12987.           specifications of the  name  (for  example,  abbreviations),  the
  12988.           string  returned  by  the  function  should  correspond to a full
  12989.           specification of the name.
  12990.           The exception STATUS_ERROR is raised if the  given  file  is  not
  12991.           open.
  12992.     \ufunction\n FORM(FILE : \uin\n FILE_TYPE) \ureturn\n STRING;
  12993.           Returns   the   \vform  string\v1401.  for  the  external  file  currently
  12994.           associated  with  the  given  file.   If  an  environment  allows
  12995.           alternative    specifications   of   the   form   (for   example,
  12996.           abbreviations using default options), the string returned by  the
  12997.           function  should  correspond to a full specification (that is, it
  12998.           should  indicate  explicitly  all  options  selected,   including
  12999.           default options).
  13000.           The  exception  STATUS_ERROR  is  raised if the given file is not
  13001.           open.
  13002.     \ufunction\n IS_OPEN(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13003.           Returns TRUE if the file is open (that is, if  it  is  associated
  13004.           with an external file), otherwise returns FALSE.
  13005. :1404
  13006. 14.2.2  \uSequential Input-Output\n
  13007. The operations available for sequential input and output are  described  in
  13008. this  section.   The  \vexception  STATUS_ERROR\v1419.  is  raised  if  any of these
  13009. operations is attempted for a \vfile\v1401. that is not open.
  13010.     \uprocedure\n READ(FILE : \uin\n \vFILE_TYPE\v1401.; ITEM : \uout\n \vELEMENT_TYPE\v1401.);
  13011.           Operates on a file of mode \vIN_FILE\v1401..  Reads an  \velement\v1401.  from  the
  13012.           given  file,  and  returns  the value of this element in the ITEM
  13013.           parameter.
  13014.           The \vexception MODE_ERROR\v1419. is raised if the mode  is  not  IN_FILE.
  13015.           The \vexception END_ERROR\v1419. is raised if no more elements can be read
  13016.           from  the  given file.  The \vexception DATA_ERROR\v1419. is raised if the
  13017.           element read cannot  be  interpreted  as  a  value  of  the  type
  13018.           ELEMENT_TYPE;  however, an implementation is allowed to omit this
  13019.           check if performing the check is too complex.
  13020.     \uprocedure\n WRITE(FILE : \uin\n FILE_TYPE; ITEM : \uin\n ELEMENT_TYPE);
  13021.           Operates on a file of mode \vOUT_FILE\v1401..  Writes the value of ITEM to
  13022.           the given file.
  13023.           The  exception  MODE_ERROR is raised if the \vmode\v1401. is not OUT_FILE.
  13024.           The \vexception USE_ERROR\v1419. is raised if the capacity of the \vexternal\v1401.
  13025.           \vfile\v1401. is exceeded.
  13026.     \ufunction\n END_OF_FILE(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13027.           Operates on a file of mode IN_FILE.   Returns  TRUE  if  no  more
  13028.           elements  can  be  read  from  the given file;  otherwise returns
  13029.           FALSE.
  13030.           The exception MODE_ERROR is raised if the mode is not IN_FILE.
  13031. :1405
  13032. 14.2.3  \uSpecification of the Package Sequential_IO\n
  13033.     with \vIO_EXCEPTIONS\v1419.;
  13034.     generic
  13035.        \utype\n ELEMENT_TYPE \uis private\n;
  13036.     \vpackage SEQUENTIAL_IO\v1402. \uis\n
  13037.        \utype\n \vFILE_TYPE\v1401. \uis limited private\n;
  13038.        \utype\n \vFILE_MODE\v1401. \uis\n (\vIN_FILE\v1401., \vOUT_FILE\v1401.);
  13039.        -- File management
  13040.        \vprocedure CREATE\v1403.(FILE : \uin out\n FILE_TYPE;
  13041.                         MODE : \uin\n FILE_MODE := OUT_FILE;
  13042.                         NAME : \uin\n STRING := "";
  13043.                         FORM : \uin\n STRING := "");
  13044.        \vprocedure OPEN\v1403.  (FILE : \uin out\n FILE_TYPE;
  13045.                         MODE : \uin\n FILE_MODE;
  13046.                         NAME : \uin\n STRING;
  13047.                         FORM : \uin\n STRING := "");
  13048.        \vprocedure CLOSE\v1403. (FILE : \uin out\n FILE_TYPE);
  13049.        \vprocedure DELETE\v1403.(FILE : \uin out\n FILE_TYPE);
  13050.        \vprocedure RESET\v1403. (FILE : \uin out\n FILE_TYPE; MODE : \uin\n FILE_MODE);
  13051.        \uprocedure\n RESET (FILE : \uin out\n FILE_TYPE);
  13052.        \vfunction MODE\v1403.   (FILE : \uin\n FILE_TYPE) \ureturn\n FILE_MODE;
  13053.        \vfunction NAME\v1403.   (FILE : \uin\n FILE_TYPE) \ureturn\n STRING;
  13054.        \vfunction FORM\v1403.   (FILE : \uin\n FILE_TYPE) \ureturn\n STRING;
  13055.        \vfunction IS_OPEN\v1403.(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13056.        -- Input and output operations
  13057.        \vprocedure READ\v1404.  (FILE : \uin\n FILE_TYPE; ITEM : \uout\n ELEMENT_TYPE);
  13058.        \vprocedure WRITE\v1404. (FILE : \uin\n FILE_TYPE; ITEM : \uin\n ELEMENT_TYPE);
  13059.        \vfunction END_OF_FILE\v1404.(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13060.        -- Exceptions
  13061.        \vSTATUS_ERROR\v1419. : \uexception renames\n IO_EXCEPTIONS.STATUS_ERROR;
  13062.        \vMODE_ERROR\v1419.   : \uexception renames\n IO_EXCEPTIONS.MODE_ERROR;
  13063.        \vNAME_ERROR\v1419.   : \uexception renames\n IO_EXCEPTIONS.NAME_ERROR;
  13064.        \vUSE_ERROR\v1419.    : \uexception renames\n IO_EXCEPTIONS.USE_ERROR;
  13065.        \vDEVICE_ERROR\v1419. : \uexception renames\n IO_EXCEPTIONS.DEVICE_ERROR;
  13066.        \vEND_ERROR\v1419.    : \uexception renames\n IO_EXCEPTIONS.END_ERROR;
  13067.        \vDATA_ERROR\v1419.   : \uexception renames\n IO_EXCEPTIONS.DATA_ERROR;
  13068.     \uprivate\n
  13069.        -- implementation-dependent
  13070.     \uend\n SEQUENTIAL_IO;
  13071. :1406
  13072. 14.2.4  \uDirect Input-Output\n
  13073. The  operations available for direct input and output are described in this
  13074. section.  The \vexception STATUS_ERROR\v1419. is raised if any of  these  operations
  13075. is attempted for a \vfile\v1401. that is not \vopen\v1401..
  13076.     \uprocedure\n READ(FILE : \uin\n \vFILE_TYPE\v1401.; ITEM : \uout\n \vELEMENT_TYPE\v1401.;
  13077.                                         FROM : \uin \n \vPOSITIVE_COUNT\v1408.);
  13078.     \uprocedure\n READ(FILE : \uin\n FILE_TYPE; ITEM : \uout\n ELEMENT_TYPE);
  13079.           Operates on a file of mode \vIN_FILE\v1401. or \vINOUT_FILE\v1401..  In the case of
  13080.           the  first  form, sets the \vcurrent index\v1402. of the given file to the
  13081.           \vindex\v1402. value given by the parameter FROM.  Then (for  both  forms)
  13082.           returns,  in  the  parameter ITEM, the value of the \velement\v1401. whose
  13083.           position in the given file is specified by the current  index  of
  13084.           the file;  finally, increases the current index by one.
  13085.           The  \vexception MODE_ERROR\v1419. is raised if the \vmode\v1401. of the given file
  13086.           is OUT_FILE.  The \vexception END_ERROR\v1419. is raised if the  index  to
  13087.           be  used  exceeds  the  size of the \vexternal file\v1401..  The \vexception\v1419.
  13088.           \vDATA_ERROR\v1419. is raised if the element read cannot be interpreted as
  13089.           a value of the type ELEMENT_TYPE;  however, an implementation  is
  13090.           allowed  to  omit  this  check  if  performing  the  check is too
  13091.           complex.
  13092.     \uprocedure\n WRITE(FILE : \uin\n FILE_TYPE; ITEM : \uin\n ELEMENT_TYPE;
  13093.                                          TO   : \uin\n POSITIVE_COUNT);
  13094.     \uprocedure\n WRITE(FILE : \uin\n FILE_TYPE; ITEM : \uin\n ELEMENT_TYPE);
  13095.           Operates on a file of mode INOUT_FILE or OUT_FILE.  In  the  case
  13096.           of  the first form, sets the index of the given file to the index
  13097.           value given by the parameter TO.  Then (for both forms) gives the
  13098.           value of the parameter ITEM to the element whose position in  the
  13099.           given  file  is  specified  by  the  current  index  of the file;
  13100.           finally, increases the current index by one.
  13101.           The exception MODE_ERROR is raised if the mode of the given  file
  13102.           is IN_FILE.  The \vexception USE_ERROR\v1419. is raised if the capacity of
  13103.           the external file is exceeded.
  13104.     \uprocedure\n SET_INDEX(FILE : \uin\n FILE_TYPE; TO : \uin\n POSITIVE_COUNT);
  13105.           Operates  on  a  file of any mode.  Sets the current index of the
  13106.           given file to the given index value (which may exceed the \vcurrent\v1402.
  13107.           \vsize\v1402. of the file).
  13108.     \ufunction\n INDEX(FILE : \uin\n FILE_TYPE) \ureturn\n POSITIVE_COUNT;
  13109.           Operates on a file of any mode.  Returns the current index of the
  13110.           given file.
  13111.     \ufunction\n SIZE(FILE : \uin\n FILE_TYPE) \ureturn\n \vCOUNT\v1402.;
  13112.           Operates on a file of any mode.  Returns the current size of  the
  13113.           external file that is associated with the given file.
  13114.     \ufunction\n END_OF_FILE(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13115.           Operates  on  a file of mode IN_FILE or INOUT_FILE.  Returns TRUE
  13116.           if the current index exceeds  the  size  of  the  external  file;
  13117.           otherwise returns FALSE.
  13118.           The  exception MODE_ERROR is raised if the mode of the given file
  13119.           is OUT_FILE.
  13120. :1407
  13121. 14.2.5  \uSpecification of the Package Direct_IO\n
  13122.     \uwith\n \vIO_EXCEPTIONS\v1419.;
  13123.     generic
  13124.        \utype\n \vELEMENT_TYPE\v1406. \uis private\n;
  13125.     \upackage\n DIRECT_IO \uis\n
  13126.        \utype\n \vFILE_TYPE\v1406. \uis limited private\n;
  13127.        \utype\n FILE_MODE \uis\n (\vIN_FILE\v1406., \vINOUT_FILE\v1406., \vOUT_FILE\v1403.);
  13128.        \vtype    COUNT\v1402.     \uis range\n 0 .. implementation defined;
  13129.        \usubtype\n POSITIVE_COUNT \uis\n COUNT \urange\n 1 .. COUNT'LAST;
  13130.        -- File management
  13131.        \vprocedure CREATE\v1403.(FILE : \uin out\n FILE_TYPE;
  13132.                         MODE : \uin\n FILE_MODE := INOUT_FILE;
  13133.                         NAME : \uin\n STRING := "";
  13134.                         FORM : \uin\n STRING := "");
  13135.        \vprocedure OPEN\v1403.  (FILE : \uin out\n FILE_TYPE;
  13136.                         MODE : \uin\n FILE_MODE;
  13137.                         NAME : \uin\n STRING;
  13138.                         FORM : \uin\n STRING := "");
  13139.        \vprocedure CLOSE\v1403. (FILE : \uin out\n FILE_TYPE);
  13140.        \vprocedure DELETE\v1403.(FILE : \uin out\n FILE_TYPE);
  13141.        \uprocedure\n RESET (FILE : \uin out\n FILE_TYPE; MODE : \uin\n FILE_MODE);
  13142.        \uprocedure\n RESET (FILE : \uin out\n FILE_TYPE);
  13143.        \vfunction MODE\v1403.   (FILE : \uin\n FILE_TYPE) \ureturn\n FILE_MODE;
  13144.        \vfunction NAME\v1403.   (FILE : \uin\n FILE_TYPE) \ureturn\n STRING;
  13145.        \vfunction FORM\v1403.   (FILE : \uin\n FILE_TYPE) \ureturn\n STRING;
  13146.        \vfunction IS_OPEN\v1403.(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13147.        -- Input and output operations
  13148.        \vprocedure READ\v1406. (FILE : \uin\n FILE_TYPE; ITEM : \uout\n ELEMENT_TYPE; FROM :
  13149.         POSITIVE_COUNT);
  13150.        \uprocedure\n READ (FILE : \uin\n FILE_TYPE; ITEM : \uout\n ELEMENT_TYPE);
  13151.        \vprocedure WRITE\v1406.(FILE : \uin\n FILE_TYPE; ITEM : \uin \n ELEMENT_TYPE; TO :
  13152.         POSITIVE_COUNT);
  13153.        \uprocedure\n WRITE(FILE : \uin\n FILE_TYPE; ITEM : \uin\n ELEMENT_TYPE);
  13154.        \vprocedure SET_INDEX\v1406.(FILE : \uin\n FILE_TYPE; TO : \uin\n POSITIVE_COUNT);
  13155.        \vfunction INDEX\v1406.(FILE : \uin\n FILE_TYPE) \ureturn\n POSITIVE_COUNT;
  13156.        \vfunction SIZE\v1406. (FILE : \uin\n FILE_TYPE) \ureturn\n COUNT;
  13157.        \vfunction END_OF_FILE\v1406.(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13158.        -- Exceptions
  13159.        \vSTATUS_ERROR\v1419. : \uexception renames\n IO_EXCEPTIONS.STATUS_ERROR;
  13160.        \vMODE_ERROR\v1419.   : \uexception renames\n IO_EXCEPTIONS.MODE_ERROR;
  13161.        \vNAME_ERROR\v1419.   : \uexception renames\n IO_EXCEPTIONS.NAME_ERROR;
  13162.        \vUSE_ERROR\v1419.    : \uexception renames\n IO_EXCEPTIONS.USE_ERROR;
  13163.        \vDEVICE_ERROR\v1419. : \uexception renames\n IO_EXCEPTIONS.DEVICE_ERROR;
  13164.        \vEND_ERROR\v1419.    : \uexception renames\n IO_EXCEPTIONS.END_ERROR;
  13165.        \vDATA_ERROR\v1419.   : \uexception renames\n IO_EXCEPTIONS.DATA_ERROR;
  13166.     \uprivate\n
  13167.        -- implementation-dependent
  13168.     \uend\n DIRECT_IO;
  13169. :1408
  13170. 14.3  \uText Input-Output\n
  13171. This  section  describes the package TEXT_IO, which provides facilities for
  13172. input and output in human-readable form.  Each  \vfile\v1401.  is  \vread\v1404.  or  written
  13173. sequentially,  as  a  sequence  of  characters grouped into lines, and as a
  13174. sequence of lines grouped into pages.  The specification of the package  is
  13175. given below in section 14.3.10.
  13176. The  facilities  for  file  management  given above, in sections 14.2.1 and
  13177. 14.2.2, are available for text input-output.  In place of READ  and  WRITE,
  13178. however,  there  are  procedures  \vGET\v1413. and \vPUT\v1413. that input values of suitable
  13179. types from text files,  and  output  values  to  them.   These  values  are
  13180. provided  to  the  PUT procedures, and returned by the GET procedures, in a
  13181. parameter ITEM.  Several overloaded procedures of these  names  exist,  for
  13182. different  types of ITEM.  These GET procedures analyze the input sequences
  13183. of  characters  as  lexical  elements  (see  Chapter  2)  and  return   the
  13184. corresponding  values;   the  PUT  procedures  output  the  given values as
  13185. appropriate lexical elements.  Procedures GET and PUT  are  also  available
  13186. that  input  and  output  individual characters treated as character values
  13187. rather than as lexical elements.
  13188. In addition to the procedures GET and PUT for numeric and enumeration types
  13189. of ITEM that operate on text files, analogous procedures are provided  that
  13190. read  from  and  write  to  a  parameter  of type STRING.  These procedures
  13191. perform the same analysis and composition of character sequences  as  their
  13192. counterparts which have a file parameter.
  13193. For  all  GET  and  PUT procedures that operate on text files, and for many
  13194. other subprograms, there are forms with and without a file parameter.  Each
  13195. such GET procedure operates on an input file, and each such  PUT  procedure
  13196. operates  on an output file.  If no file is specified, a default input file
  13197. or a default output file is used.
  13198. At the beginning of program execution the default input  and  output  files
  13199. are  the  so-called  \vstandard  input  file\v1410. and \vstandard output file\v1410..  These
  13200. files are open, have respectively the current modes \vIN_FILE\v1401.  and  \vOUT_FILE\v1401.,
  13201. and   are   associated  with  two  implementation-defined  \vexternal  files\v1401..
  13202. Procedures are provided to change the \vcurrent default input  file\v1410.  and  the
  13203. \vcurrent default output file\v1410..
  13204. From a logical point of view, a text file is a sequence of pages, a page is
  13205. a  sequence of lines, and a line is a sequence of characters;  the end of a
  13206. line is marked by a line terminator;  the end of a page is  marked  by  the
  13207. combination of a line terminator immediately followed by a page terminator;
  13208. and  the  end  of  a file is marked by the combination of a line terminator
  13209. immediately followed by a page  terminator  and  then  a  file  terminator.
  13210. Terminators  are  generated  during  output;  either by calls of procedures
  13211. provided expressly for that  purpose;   or  implicitly  as  part  of  other
  13212. operations, for example, when a bounded line length, a bounded page length,
  13213. or both, have been specified for a file.
  13214. The  actual  nature of terminators is not defined by the language and hence
  13215. depends on the implementation.   Although  terminators  are  recognized  or
  13216. generated   by  certain  of  the  procedures  that  follow,  they  are  not
  13217. necessarily implemented  as  characters  or  as  sequences  of  characters.
  13218. Whether  they  are  characters  (and  if  so  which ones) in any particular
  13219. implementation need not concern a user who neither explicitly  outputs  nor
  13220. explicitly  inputs  control  characters.   The effect of input or output of
  13221. control characters (other than horizontal tabulation) is not defined by the
  13222. language.
  13223. The characters of a line are numbered, starting from one;  the number of  a
  13224. character  is  called  its  column number.  For a line terminator, a column
  13225. number is also defined:  it is one more than the number  of  characters  in
  13226. the  line.   The  lines  of  a page, and the pages of a file, are similarly
  13227. numbered.  The current column number is  the  column  number  of  the  next
  13228. character or line terminator to be transferred.  The current line number is
  13229. the  number  of the current line.  The current page number is the number of
  13230. the current page.  These numbers are values of the  subtype  POSITIVE_COUNT
  13231. of  the \vtype COUNT\v1418. (by convention, the value zero of the type COUNT is used
  13232. to indicate special conditions).
  13233.     type COUNT is range 0 .. implementation_defined;
  13234.     subtype POSITIVE_COUNT is COUNT range 1 .. COUNT'LAST;
  13235. For an output file, a maximum line length can be specified  and  a  maximum
  13236. page  length  can  be specified.  If a value to be output cannot fit on the
  13237. current line, for a specified maximum line  length,  then  a  new  line  is
  13238. automatically  started  before  the value is output;  if, further, this new
  13239. line cannot fit on the current page, for a specified maximum  page  length,
  13240. then  a  new  page  is  automatically  started  before the value is output.
  13241. Functions are provided to determine the maximum line length and the maximum
  13242. page length.  When a file is opened with mode  OUT_FILE,  both  values  are
  13243. zero:  by convention, this means that the line lengths and page lengths are
  13244. unbounded.   (Consequently,  output  consists  of  a  single  line  if  the
  13245. subprograms for explicit control of line and page structure are not  used.)
  13246. The constant UNBOUNDED is provided for this purpose.
  13247. More details:
  13248.  14.3.1  \vFile Management\v1409.
  13249.  14.3.2  \vDefault Input and Output Files\v1410.
  13250.  14.3.3  \vSpecification of Line and Page Lengths\v1411.
  13251.  14.3.4  \vOperations on Columns, Lines and Pages\v1412.
  13252.  14.3.5  \vGET and PUT Procedures\v1413.
  13253.  14.3.6  \vInput-output of Characters and Strings\v1414.
  13254.  14.3.7  \vInput-Output for Integer Types\v1415.
  13255.  14.3.8  \vInput-Output for Real Types\v1416.
  13256.  14.3.9  \vInput-Output for Enumeration Types\v1417.
  13257.  14.3.10 \vSpecification of the Package TEXT_IO\v1418.
  13258. :1409
  13259. 14.3.1  \uFile Management\n
  13260. The only allowed \vfile modes\v1401. for  text  \vfiles\v1401.  are  the  modes  \vIN_FILE\v1401.  and
  13261. \vOUT_FILE\v1401..   The  subprograms  given  in  section  14.2.1 for the control of
  13262. \vexternal files\v1401., and the function \vEND_OF_FILE\v1408. given in  section  14.2.2  for
  13263. sequential  input-output, are also available for text files.  There is also
  13264. a version of END_OF_FILE that refers to the  \vcurrent  default  input  file\v1408..
  13265. For text files, the procedures have the following additional effects:
  13266.   -  For the procedures \vCREATE\v1403. and \vOPEN\v1403.:  After opening a  file  with  mode
  13267.      OUT_FILE, the \vpage length\v1408. and \vline length\v1408. are unbounded (both have the
  13268.      conventional  value  zero).  After opening a file with mode IN_FILE or
  13269.      OUT_FILE, the \vcurrent column\v1408., \vcurrent line\v1408., and \vcurrent  page  numbers\v1408.
  13270.      are set to one.
  13271.   -  For the procedure CLOSE:  If the file has the current  mode  OUT_FILE,
  13272.      has the effect of calling NEW_PAGE, unless the current page is already
  13273.      terminated; then outputs a \vfile terminator\v1408..
  13274.   -  For the \vprocedure RESET\v1403.:  If the file has the current  mode  OUT_FILE,
  13275.      has the effect of calling NEW_PAGE, unless the current page is already
  13276.      terminated;   then outputs a file terminator.  If the new file mode is
  13277.      OUT_FILE, the page and line lengths are unbounded.  For all modes, the
  13278.      current column, line, and page numbers are set to one.
  13279. The \vexception MODE_ERROR\v1419. is raised by the procedure RESET upon  an  attempt
  13280. to change the mode of a file that is either the current default input file,
  13281. or the current default output file.
  13282. :1410
  13283. 14.3.2  \uDefault Input and Output Files\n
  13284. The following subprograms provide for the control of the particular \vdefault\v1408.
  13285. \vfiles\v1408. that are used when a file parameter is omitted from  a  \vGET\v1413.,  \vPUT\v1413.  or
  13286. other operation of text input-output described below.
  13287.     \uprocedure\n SET_INPUT(FILE : \uin\n \vFILE_TYPE\v1401.);
  13288.           Operates  on  a  file  of mode IN_FILE.  Sets the current default
  13289.           input file to FILE.
  13290.           The \vexception STATUS_ERROR\v1419. is raised if the  given  file  is  not
  13291.           open.   The  \vexception  MODE_ERROR\v1419.  is  raised if the mode of the
  13292.           given file is not IN_FILE.
  13293.     \uprocedure\n SET_OUTPUT(FILE : \uin\n FILE_TYPE);
  13294.           Operates on a file of mode OUT_FILE.  Sets  the  current  default
  13295.           output file to FILE.
  13296.           The  exception  STATUS_ERROR  is  raised if the given file is not
  13297.           open.  The exception MODE_ERROR is raised  if  the  mode  of  the
  13298.           given file is not OUT_FILE.
  13299.     \ufunction\n STANDARD_INPUT \ureturn\n FILE_TYPE;
  13300.           Returns the standard input file (see 14.3).
  13301.     \ufunction\n STANDARD_OUTPUT \ureturn\n FILE_TYPE;
  13302.           Returns the standard output file (see 14.3).
  13303.     \ufunction\n CURRENT_INPUT \ureturn\n FILE_TYPE;
  13304.           Returns the current default input file.
  13305.     \ufunction\n CURRENT_OUTPUT \ureturn\n FILE_TYPE;
  13306.           Returns the current default output file.
  13307. Note:
  13308. The  standard input and the standard output files cannot be opened, closed,
  13309. reset,  or  deleted,  because  the  parameter  FILE  of  the  corresponding
  13310. procedures has the mode in out.
  13311. :1411
  13312. 14.3.3  \uSpecification of Line and Page Lengths\n
  13313. The  subprograms  described in this section are concerned with the \vline\v1408. and
  13314. \vpage\v1408. structure of a \vfile\v1401. of mode \vOUT_FILE\v1401..  They operate either on the file
  13315. given as the first parameter, or, in the absence of such a file  parameter,
  13316. on the \vcurrent default output file\v1408..  They provide for output of text with a
  13317. specified  \vmaximum  line  length\v1408.  or \vpage length\v1408..  In these cases, \vline\v1408. and
  13318. \vpage terminators\v1408. are output implicitly and automatically when needed.  When
  13319. \vline\v1408.  and  \vpage  lengths\v1408.  are  unbounded  (that  is,  when  they  have  the
  13320. conventional  value zero), as in the case of a newly opened file, new lines
  13321. and new pages are only started when explicitly called for.
  13322. In all cases, the \vexception STATUS_ERROR\v1419. is raised if the file to  be  used
  13323. is  not \vopen\v1401.; the \vexception MODE_ERROR\v1419. is raised if the mode of the file is
  13324. not OUT_FILE.
  13325.     \uprocedure\n SET_LINE_LENGTH(FILE : \uin\n \vFILE_TYPE\v1401.; TO : \uin\n \vCOUNT\v1408.);
  13326.     \uprocedure\n SET_LINE_LENGTH(TO   : \uin\n COUNT);
  13327.           Sets the maximum line length of the specified output file to  the
  13328.           number  of  characters  specified  by  TO.  The value zero for TO
  13329.           specifies an unbounded line length.
  13330.           The \vexception USE_ERROR\v1419. is raised if the specified line length is
  13331.           inappropriate for the associated \vexternal file\v1401..
  13332.     \uprocedure\n SET_PAGE_LENGTH(FILE : \uin\n FILE_TYPE; TO : \uin\n COUNT);
  13333.     \uprocedure\n SET_PAGE_LENGTH(TO   : \uin\n COUNT);
  13334.           Sets the maximum page length of the specified output file to  the
  13335.           number of lines specified by TO.  The value zero for TO specifies
  13336.           an \vunbounded page length\v1408..
  13337.           The exception USE_ERROR is raised if the specified page length is
  13338.           inappropriate for the associated external file.
  13339.     \ufunction\n LINE_LENGTH(FILE : \uin\n FILE_TYPE) \ureturn\n COUNT;
  13340.     \ufunction\n LINE_LENGTH \ureturn\n COUNT;
  13341.           Returns  the  maximum line length currently set for the specified
  13342.           output file, or zero if the line length is unbounded.
  13343.     \ufunction\n PAGE_LENGTH(FILE : \uin\n FILE_TYPE) \ureturn\n COUNT;
  13344.     \ufunction\n PAGE_LENGTH \ureturn\n COUNT;
  13345.           Returns the maximum page length currently set for  the  specified
  13346.           output file, or zero if the page length is unbounded.
  13347. :1412
  13348. 14.3.4  \uOperations on Columns, Lines, and Pages\n
  13349. The subprograms described in this section provide for explicit  control  of
  13350. \vline\v1408.  and  \vpage\v1408.  structure;   they  operate either on the \vfile\v1401. given as the
  13351. first parameter, or, in the absence  of  such  a  file  parameter,  on  the
  13352. appropriate   (input  or  output)  \vcurrent  default  file\v1408..   The  \vexception\v1419.
  13353. \vSTATUS_ERROR\v1419. is raised by any of these subprograms if the file to  be  used
  13354. is not \vopen\v1401..
  13355.     \uprocedure\n NEW_LINE(FILE : \uin\n FILE_TYPE; SPACING :
  13356.               \uin\n \vPOSITIVE_COUNT\v1408. := 1);
  13357.     \uprocedure\n NEW_LINE(SPACING : \uin\n POSITIVE_COUNT := 1);
  13358.           Operates on a file of mode OUT_FILE.
  13359.           For  a  SPACING  of  one:  Outputs a \vline terminator\v1408. and sets the
  13360.           \vcurrent column number\v1408. to one.  Then increments the  \vcurrent  line\v1408.
  13361.           \vnumber\v1408. by one, except in the case that the current \vline number\v1408. is
  13362.           already  greater  than or equal to the \vmaximum page length\v1408., for a
  13363.           bounded \vpage length\v1408.;  in that case a \vpage terminator\v1408.  is  output,
  13364.           the  \vcurrent  page  number\v1408. is incremented by one, and the current
  13365.           line number is set to one.
  13366.           For a SPACING greater than one, the above actions  are  performed
  13367.           SPACING times.
  13368.           The  \vexception  MODE_ERROR\v1419. is raised if the mode is not OUT_FILE.
  13369.  \uprocedure\n SKIP_LINE(FILE  : \uin\n FILE_TYPE; SPACING :
  13370.            \uin\n POSITIVE_COUNT := 1);
  13371.  \uprocedure\n SKIP_LINE(SPACING : \uin\n POSITIVE_COUNT := 1);
  13372.           Operates on a file of mode \vIN_FILE\v1401..
  13373.           For a SPACING of one:  Reads and discards all characters until  a
  13374.           line  terminator  has been read, and then sets the current column
  13375.           number to  one.   If  the  line  terminator  is  not  immediately
  13376.           followed  by  a  page  terminator,  the  current  line  number is
  13377.           incremented  by  one.   Otherwise,  if  the  line  terminator  is
  13378.           immediately   followed  by  a  page  terminator,  then  the  page
  13379.           terminator is skipped, the current page number is incremented  by
  13380.           one, and the current line number is set to one.
  13381.           For  a  SPACING greater than one, the above actions are performed
  13382.           SPACING times.
  13383.           The exception MODE_ERROR is raised if the mode  is  not  IN_FILE.
  13384.           The \vexception END_ERROR\v1419. is raised if an attempt is made to read a
  13385.           \vfile terminator\v1408..
  13386.     \ufunction\n END_OF_LINE(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13387.     \ufunction\n END_OF_LINE \ureturn\n BOOLEAN;
  13388.           Operates  on  a  file  of  mode IN_FILE.  Returns TRUE if  a line
  13389.           terminator or a  file  terminator  is  next;   otherwise  returns
  13390.           FALSE.
  13391.           The exception MODE_ERROR is raised if the mode is not IN_FILE.
  13392.     \uprocedure\n NEW_PAGE(FILE : \uin\n FILE_TYPE);
  13393.     \uprocedure\n NEW_PAGE;
  13394.           Operates  on  a file of mode OUT_FILE.  Outputs a line terminator
  13395.           if the current line is not terminated, or if the current page  is
  13396.           empty  (that  is, if the current column and line numbers are both
  13397.           equal to one).  Then outputs a page terminator, which  terminates
  13398.           the  current  page.  Adds one to the current page number and sets
  13399.           the current column and line numbers to one.
  13400.           The exception MODE_ERROR is raised if the mode is  not  OUT_FILE.
  13401.     \uprocedure\n SKIP_PAGE(FILE: \uin\n FILE_TYPE);
  13402.     \uprocedure\n SKIP_PAGE;
  13403.           Operates  on  a  file  of  mode  IN_FILE.  Reads and discards all
  13404.           characters and line terminators until a page terminator has  been
  13405.           read.   Then  adds  one  to the current page number, and sets the
  13406.           current column and line numbers to one.
  13407.           The exception MODE_ERROR is raised if the mode  is  not  IN_FILE.
  13408.           The exception END_ERROR is raised if an attempt is made to read a
  13409.           file terminator.
  13410.     \ufunction\n END_OF_PAGE(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13411.     \ufunction\n END_OF_PAGE \ureturn\n BOOLEAN;
  13412.           Operates  on  a  file  of  mode  IN_FILE.   Returns  TRUE  if the
  13413.           combination of a line terminator and a page terminator  is  next,
  13414.           or if a file terminator is next;  otherwise returns FALSE.
  13415.           The exception MODE_ERROR is raised if the mode is not IN_FILE.
  13416.     \ufunction\n END_OF_FILE(FILE : \uin\n FILE_TYPE) \ureturn\n BOOLEAN;
  13417.     \ufunction\n END_OF_FILE \ureturn\n BOOLEAN;
  13418.           Operates  on  a  file  of  mode  IN_FILE.  Returns TRUE if a file
  13419.           terminator is next, or if the combination of a line, a page,  and
  13420.           a file terminator is next;  otherwise returns FALSE.
  13421.           The exception MODE_ERROR is raised if the mode is not IN_FILE.
  13422. The  following  subprograms provide for the control of the current position
  13423. of reading or writing in a file.  In all cases, the  default  file  is  the
  13424. current output file.
  13425.     \uprocedure\n SET_COL(FILE : \uin\n FILE_TYPE; TO : \uin\n POSITIVE_COUNT);
  13426.     \uprocedure\n SET_COL(TO   : \uin\n POSITIVE_COUNT);
  13427.           If the file mode is OUT_FILE:
  13428.                If  the  value  specified  by TO is greater than the current
  13429.                column number, outputs spaces, adding  one  to  the  current
  13430.                column  number  after  each  space, until the current column
  13431.                number equals the specified value.  If the  value  specified
  13432.                by  TO  is  equal  to the current column number, there is no
  13433.                effect.  If the value specified  by  TO  is  less  than  the
  13434.                current  column  number,  has the effect of calling NEW_LINE
  13435.                (with a spacing of one), then outputs (TO - 1)  spaces,  and
  13436.                sets the current column number to the specified value.
  13437.                The  \vexception LAYOUT_ERROR\v1419. is raised if the value specified
  13438.                by TO exceeds LINE_LENGTH when the line  length  is  bounded
  13439.                (that  is,  when  it  does  not  have the conventional value
  13440.                zero).
  13441.           If the file mode is IN_FILE:
  13442.                Reads   (and   discards)   individual    characters,    line
  13443.                terminators,  and page terminators, until the next character
  13444.                to be read  has  a  column  number  that  equals  the  value
  13445.                specified  by  TO;  there is no effect if the current column
  13446.                number already  equals  this  value.   Each  transfer  of  a
  13447.                character  or terminator maintains the current column, line,
  13448.                and page numbers in the same way as  a  \vGET  procedure\v1413.  (see
  13449.                14.3.5).   (Short  lines  will  be  skipped  until a line is
  13450.                reached  that  has  a  character  at  the  specified  column
  13451.                position.)
  13452.                The  exception  END_ERROR is raised if an attempt is made to
  13453.                read a file terminator.
  13454.     \uprocedure\n SET_LINE(FILE : \uin\n FILE_TYPE; TO : \uin\n POSITIVE_COUNT);
  13455.     \uprocedure\n SET_LINE(TO   : \uin\n POSITIVE_COUNT);
  13456.           If the file mode is OUT_FILE:
  13457.                If the value specified by TO is  greater  than  the  current
  13458.                line  number,  has the effect of repeatedly calling NEW_LINE
  13459.                (with a spacing of  one),  until  the  current  line  number
  13460.                equals the specified value.  If the value specified by TO is
  13461.                equal  to  the  current line number, there is no effect.  If
  13462.                the value specified by TO is  less  than  the  current  line
  13463.                number,  has  the  effect  of calling NEW_PAGE followed by a
  13464.                call of NEW_LINE with a spacing equal to (TO - 1).
  13465.                The exception LAYOUT_ERROR is raised if the value  specified
  13466.                by  TO  exceeds  PAGE_LENGTH when the page length is bounded
  13467.                (that is, when it  does  not  have  the  conventional  value
  13468.                zero).
  13469.           If the mode is IN_FILE:
  13470.                Has  the  effect  of  repeatedly  calling  SKIP_LINE (with a
  13471.                spacing of one), until the current line  number  equals  the
  13472.                value  specified  by  TO;  there is no effect if the current
  13473.                line number already equals this value.  (Short pages will be
  13474.                skipped until a page is reached  that  has  a  line  at  the
  13475.                specified line position.)
  13476.                The  exception  END_ERROR is raised if an attempt is made to
  13477.                read a file terminator.
  13478.     \ufunction\n COL(FILE : \uin\n FILE_TYPE) \ureturn\n POSITIVE_COUNT;
  13479.     \ufunction\n COL \ureturn\n POSITIVE_COUNT;
  13480.           Returns the current column number.
  13481.           The exception LAYOUT_ERROR  is  raised  if  this  number  exceeds
  13482.           COUNT'LAST.
  13483.     \ufunction\n LINE(FILE : \uin\n FILE_TYPE) \ureturn\n POSITIVE_COUNT;
  13484.     \ufunction\n LINE \ureturn\n POSITIVE_COUNT;
  13485.           Returns the current line number.
  13486.           The  exception  LAYOUT_ERROR  is  raised  if  this number exceeds
  13487.           COUNT'LAST.
  13488.     \ufunction\n PAGE(FILE : \uin\n FILE_TYPE) \ureturn\n POSITIVE_COUNT;
  13489.     \ufunction\n PAGE \ureturn\n POSITIVE_COUNT;
  13490.           Returns the current page number.
  13491.           The exception LAYOUT_ERROR  is  raised  if  this  number  exceeds
  13492.           COUNT'LAST.
  13493. The  column  number,  line  number,  or  page  number are allowed to exceed
  13494. COUNT'LAST (as a consequence of the input or output  of  sufficiently  many
  13495. characters,  lines,  or pages).  These events do not cause any exception to
  13496. be raised.  However, a call of COL, LINE,  or  PAGE  raises  the  exception
  13497. LAYOUT_ERROR if the corresponding number exceeds COUNT'LAST.
  13498. Note:
  13499. A  page terminator is always skipped whenever the preceding line terminator
  13500. is skipped.  An implementation  may  represent  the  combination  of  these
  13501. terminators  by a single character, provided that it is properly recognized
  13502. at input.
  13503. :1413
  13504. 14.3.5  \uGet and Put Procedures\n
  13505. The  procedures  \vGET\v1414.  and  \vPUT\v1414.  for  items  of the types CHARACTER, STRING,
  13506. numeric types, and enumeration types are described in subsequent  sections.
  13507. Features  of  these  procedures  that are common to most of these types are
  13508. described in this section.  The GET and PUT procedures for  items  of  type
  13509. CHARACTER  and  STRING  deal with individual character values;  the GET and
  13510. PUT procedures for numeric and enumeration types treat the items as lexical
  13511. elements.
  13512. All procedures GET and PUT have forms with a file parameter, written first.
  13513. Where this parameter is omitted, the appropriate (input or output)  \vcurrent\v1408.
  13514. \vdefault file\v1408. is understood to be specified.  Each procedure GET operates on
  13515. a  \vfile\v1401.  of  mode  \vIN_FILE\v1401..   Each procedure PUT operates on a file of mode
  13516. \vOUT_FILE\v1401..
  13517. All procedures GET and PUT maintain the  current  column,  line,  and  page
  13518. numbers of the specified file:  the effect of each of these procedures upon
  13519. these  numbers  is  the resultant of the effects of individual transfers of
  13520. characters and of individual  output  or  \vskipping\v1415.  of  terminators.   Each
  13521. transfer of a character adds one to the current \vcolumn number\v1408..  Each output
  13522. of  a \vline terminator\v1401. sets the current column number to one and adds one to
  13523. the current \vline number\v1401..   Each  output  of  a  \vpage  terminator\v1401.  sets  the
  13524. current  column  and  line  numbers to one and adds one to the current \vpage\v1401.
  13525. \vnumber\v1401..  For input, each skipping of a line  terminator  sets  the  current
  13526. column  number  to  one  and  adds  one  to  the current line number;  each
  13527. skipping of a page terminator sets the current column and line  numbers  to
  13528. one  and adds one to the current page number.  Similar considerations apply
  13529. to the procedures GET_LINE, PUT_LINE, and SET_COL.
  13530. Several GET and PUT procedures, for numeric  and  enumeration  types,  have
  13531. format parameters which specify field lengths;  these parameters are of the
  13532. nonnegative subtype FIELD of the type INTEGER.
  13533. Input-output  of  enumeration  values  uses the syntax of the corresponding
  13534. lexical elements.  Any GET procedure for  an  enumeration  type  begins  by
  13535. skipping  any  leading  \vblanks\v1417., or line or page terminators;  a blank being
  13536. defined as a space or a horizontal tabulation character.  Next,  characters
  13537. are  input  only so long as the sequence input is an initial sequence of an
  13538. identifier or of a character literal (in particular, input  ceases  when  a
  13539. line  terminator  is  encountered).   The character or line terminator that
  13540. causes input to cease remains available for subsequent input.
  13541. For a numeric type, the GET  procedures  have  a  format  parameter  called
  13542. \vWIDTH\v1413..   If  the  value given for this parameter is zero, the GET procedure
  13543. proceeds in the same manner as for enumeration types, but using the  syntax
  13544. of  numeric literals instead of that of enumeration literals.  If a nonzero
  13545. value is given, then exactly WIDTH characters are input, or the  characters
  13546. up to a line terminator, whichever comes first;  any skipped leading blanks
  13547. are  included  in  the  count.   The syntax used for numeric literals is an
  13548. extended syntax that allows a leading sign (but no intervening  blanks,  or
  13549. line or page terminators).
  13550. Any PUT procedure, for an item of a numeric or an enumeration type, outputs
  13551. the  value  of  the  item  as  a  numeric literal, identifier, or character
  13552. literal, as appropriate.  This is preceded by leading spaces if required by
  13553. the format parameters WIDTH or \vFORE\v1416. (as described in later  sections),  and
  13554. then  a  minus  sign  for  a  negative value;  for an enumeration type, the
  13555. spaces follow instead of leading.  The format given for a PUT procedure  is
  13556. overridden if it is insufficiently wide.
  13557. Two  further  cases  arise  for  PUT procedures for numeric and enumeration
  13558. types, if the line length of the specified output file is bounded (that is,
  13559. if it does not have  the  conventional  value  zero).   If  the  number  of
  13560. characters  to  be  output  does not exceed the \vmaximum line length\v1408., but is
  13561. such that they cannot fit on the current line, starting  from  the  current
  13562. column,  then (in effect) NEW_LINE is called (with a spacing of one) before
  13563. output of the item.  Otherwise, if the number  of  characters  exceeds  the
  13564. maximum  line  length,  then  the  \vexception  LAYOUT_ERROR\v1419. is raised and no
  13565. characters are output.
  13566. The \vexception  STATUS_ERROR\v1419.  is  raised  by  any  of  the  procedures  GET,
  13567. GET_LINE,  PUT,  and  PUT_LINE  if  the  file  to be used is not open.  The
  13568. \vexception MODE_ERROR\v1419. is raised by the procedures GET and  GET_LINE  if  the
  13569. \vmode\v1401.  of the file to be used is not IN_FILE;  and by the procedures PUT and
  13570. PUT_LINE, if the mode is not OUT_FILE.
  13571. The \vexception END_ERROR\v1419. is raised by a GET procedure if an attempt is  made
  13572. to  skip  a  file  terminator.  The \vexception DATA_ERROR\v1419. is raised by a GET
  13573. procedure  if  the  sequence  finally  input  is  not  a  lexical   element
  13574. corresponding  to the type, in particular if no characters were input;  for
  13575. this test, leading blanks are ignored;  for an item of a numeric type, when
  13576. a sign is input, this rule applies to the succeeding numeric literal.   The
  13577. exception  LAYOUT_ERROR  is  raised  by  a  PUT procedure that outputs to a
  13578. parameter  of  type  STRING,  if  the  length  of  the  actual  string   is
  13579. insufficient for the output of the item.
  13580. \uExamples:\n
  13581. In  the examples, here and in sections 14.3.7 and 14.3.8, the string quotes
  13582. and the lower case letter b are not transferred:  they are  shown  only  to
  13583. reveal the layout and spaces.
  13584.     N : INTEGER;
  13585.        ...
  13586.     GET(N);
  13587.     -- Characters at input      Sequence input     Value of N
  13588.     --      bb-12535b           -12535             -12535
  13589.     --      bb12_535E1b          12_535E1           125350
  13590.     --      bb12_535E;           12_535E           (none) DATA_ERROR raised
  13591. Example of overridden width parameter:
  13592.     PUT(ITEM => -23, WIDTH => 2);  --  "-23"
  13593. :1414
  13594. 14.3.6  \uInput-Output of Characters and Strings\n
  13595. For an item of type CHARACTER the following procedures are provided:
  13596.     \vprocedure GET\v1413.(\vFILE\v1401. : in FILE_TYPE; ITEM : out CHARACTER);
  13597.     procedure GET(ITEM : out CHARACTER);
  13598.           After \vskipping\v1413. any line terminators  and  any  \vpage  terminators\v1408.,
  13599.           reads  the  next  character  from  the  specified  input file and
  13600.           returns the value of this character in the out parameter ITEM.
  13601.           The \vexception END_ERROR\v1419. is raised if an attempt is made to skip a
  13602.           \vfile terminator\v1408..
  13603.     \vprocedure PUT\v1412.(FILE : in FILE_TYPE; ITEM : in CHARACTER);
  13604.     procedure PUT(ITEM : in CHARACTER);
  13605.           If the \vline length\v1408. of the specified output file is bounded  (that
  13606.           is,  does  not have the conventional value zero), and the \vcurrent\v1408.
  13607.           \vcolumn number\v1408. exceeds it, has the effect of calling NEW_LINE with
  13608.           a  spacing  of  one.   Then,  or  otherwise,  outputs  the  given
  13609.           character to the file.
  13610. For an item of type STRING the following procedures are provided:
  13611.     \uprocedure\n GET(FILE : \uin\n FILE_TYPE; ITEM : \uout\n STRING);
  13612.     \uprocedure\n GET(ITEM : \uout\n STRING);
  13613.           Determines  the  length  of  the  given  string and attempts that
  13614.           number of GET operations for successive characters of the  string
  13615.           (in particular, no operation is performed if the string is null).
  13616.     \uprocedure\n PUT(FILE : \uin\n FILE_TYPE; ITEM : \uin\n STRING);
  13617.     \uprocedure\n PUT(ITEM : \uin\n STRING);
  13618.           Determines  the  length  of  the  given  string and attempts that
  13619.           number of PUT operations for successive characters of the  string
  13620.           (in particular, no operation is performed if the string is null).
  13621. \uprocedure\n GET_LINE(FILE : \uin\n FILE_TYPE; ITEM : \uout\n STRING; LAST :
  13622.           \uout\n NATURAL);
  13623. \uprocedure\n GET_LINE(ITEM : \uout\n STRING;   LAST : \uout\n NATURAL);
  13624.           Replaces   successive  characters  of  the  specified  string  by
  13625.           successive  characters  read  from  the  specified  input   file.
  13626.           Reading  stops  if  the end of the \vline\v1408. is met, in which case the
  13627.           procedure SKIP_LINE is then called (in effect) with a spacing  of
  13628.           one;   reading  also  stops  if  the  end  of  the string is met.
  13629.           Characters not replaced are left undefined.
  13630.           If characters are read, returns in LAST the index value such that
  13631.           ITEM(LAST) is the last character replaced (the index of the first
  13632.           character replaced is ITEM'FIRST).  If no  characters  are  read,
  13633.           returns  in LAST an index value that is one less than ITEM'FIRST.
  13634.           The exception END_ERROR is raised if an attempt is made to skip a
  13635.           file terminator.
  13636.     \uprocedure\n PUT_LINE(FILE : \uin\n FILE_TYPE; ITEM : \uin\n STRING);
  13637.     \uprocedure\n PUT_LINE(ITEM : \uin\n STRING);
  13638.           Calls the procedure PUT  for  the  given  string,  and  then  the
  13639.           \vprocedure NEW_LINE\v1412. with a spacing of one.
  13640. \uNotes:\n
  13641. In  a  literal  string  parameter  of  PUT,  the  enclosing  string bracket
  13642. characters are not output.  Each doubled string bracket  character  in  the
  13643. enclosed  string  is  output  as  a  single  string bracket character, as a
  13644. consequence of the rule for string literals (see 2.6).
  13645. A string read by GET or written by PUT can extend over several lines.
  13646. :1415
  13647. 14.3.7  \uInput-Output for Integer Types\n
  13648. The  following  procedures  are  defined in the generic \vpackage INTEGER_IO\v1418..
  13649. This must be instantiated for the appropriate integer  type  (indicated  by
  13650. NUM in the specification).
  13651. Values   are  output  as  \vdecimal\v205.  or  \vbased  literals\v206.,  without  underline
  13652. characters or exponent, and preceded by a  minus  sign  if  negative.   The
  13653. format  (which includes any leading spaces and minus sign) can be specified
  13654. by an optional field \vwidth\v1413. parameter.  Values of widths of fields in output
  13655. formats are of the nonnegative integer subtype \vFIELD\v1413..  Values of bases  are
  13656. of the integer subtype NUMBER_BASE.
  13657.     \usubtype\n NUMBER_BASE \uis\n INTEGER \urange\n 2 .. 16;
  13658. The  default  field  width  and  base  to  be used by output procedures are
  13659. defined by the following variables that are declared in the generic package
  13660. INTEGER_IO:
  13661.     DEFAULT_WIDTH : FIELD := NUM'WIDTH;
  13662.     DEFAULT_BASE  : NUMBER_BASE := 10;
  13663. The following procedures are provided:
  13664.  \vprocedure GET\v1413.(FILE : in \vFILE_TYPE\v1401.; ITEM : out NUM; WIDTH : in FIELD := 0);
  13665.  procedure GET(ITEM : out NUM; WIDTH : in FIELD := 0);
  13666.           If the value of the parameter WIDTH is zero,  skips  any  leading
  13667.           \vblanks\v1413.,  \vline terminators\v1408., or page terminators, then reads a plus
  13668.           or a minus sign if present, then reads according to the syntax of
  13669.           an \vinteger literal\v204. (which may be a based literal).  If a  nonzero
  13670.           value  of  WIDTH  is  supplied, then exactly WIDTH characters are
  13671.           input, or the characters (possibly none) up to a line terminator,
  13672.           whichever comes first;  any skipped leading blanks  are  included
  13673.           in the count.
  13674.           Returns,  in  the  parameter  ITEM,  the  value  of type NUM that
  13675.           corresponds to the sequence input.
  13676.           The \vexception DATA_ERROR\v1419. is raised if the sequence input does not
  13677.           have the required syntax or if the value obtained is not  of  the
  13678.           subtype NUM.
  13679.     \vprocedure PUT\v1413.(FILE  : \uin\n FILE_TYPE;
  13680.                   ITEM  : \uin\n NUM;
  13681.                   WIDTH : \uin\n FIELD := DEFAULT_WIDTH;
  13682.                   BASE  : \uin\n NUMBER_BASE := DEFAULT_BASE);
  13683.     \uprocedure\n PUT(ITEM  : \uin\n NUM;
  13684.                   WIDTH : \uin\n FIELD := DEFAULT_WIDTH;
  13685.                   BASE  : \uin\n NUMBER_BASE := DEFAULT_BASE);
  13686.           Outputs  the  value  of the parameter ITEM as an integer literal,
  13687.           with no underlines, no exponent, and  no  leading  zeros  (but  a
  13688.           single zero for the value zero), and a preceding minus sign for a
  13689.           negative value.
  13690.           If  the  resulting  sequence of characters to be output has fewer
  13691.           than WIDTH characters, then leading spaces are  first  output  to
  13692.           make up the difference.
  13693.           Uses the syntax for decimal literal if the parameter BASE has the
  13694.           value   ten   (either   explicitly   or   through  DEFAULT_BASE);
  13695.           otherwise, uses the syntax for based literal, with any letters in
  13696.           upper case.
  13697.     procedure GET(FROM : in STRING; ITEM : out NUM; LAST : out POSITIVE);
  13698.           Reads an integer value from the beginning of  the  given  string,
  13699.           following  the  same  rules  as  the  GET procedure that reads an
  13700.           integer value from a file, but treating the end of the string  as
  13701.           a  file terminator.  Returns, in the parameter ITEM, the value of
  13702.           type NUM that corresponds to the sequence input.  Returns in LAST
  13703.           the index value such that FROM(LAST) is the last character  read.
  13704.           The exception DATA_ERROR is raised if the sequence input does not
  13705.           have  the  required syntax or if the value obtained is not of the
  13706.           subtype NUM.
  13707.     \uprocedure\n PUT(TO   : \uout\n STRING;
  13708.                   ITEM : \uin\n NUM;
  13709.                   BASE : \uin\n NUMBER_BASE := DEFAULT_BASE);
  13710.           Outputs the value of the parameter  ITEM  to  the  given  string,
  13711.           following the same rule as for output to a file, using the length
  13712.           of the given string as the value for WIDTH.
  13713. \uExamples:\n
  13714.     \upackage\n INT_IO \uis new\n INTEGER_IO(SMALL_INT); \uuse\n INT_IO;
  13715.     -- default format used at instantiation,
  13716.          DEFAULT_WIDTH = 4, DEFAULT_BASE = 10
  13717.     PUT(126);                            -- "b126"
  13718.     PUT(-126, 7);                        -- "bbb-126"
  13719.     PUT(126, WIDTH => 13, BASE => 2);    -- "bbb2#1111110#"
  13720. :1416
  13721. 14.3.8  \uInput-Output for Real Types\n
  13722. The  following  procedures are defined in the generic packages \vFLOAT_IO\v1418. and
  13723. \vFIXED_IO\v1418., which must be instantiated for the appropriate floating point  or
  13724. fixed point type respectively (indicated by NUM in the specifications).
  13725. Values  are  output  as \vdecimal literals\v205. without underline characters.  The
  13726. format of each value output consists of a \vFORE\v320. field, a decimal  point,  an
  13727. \vAFT\v320. field, and (if a nonzero EXP parameter is supplied) the letter E and an
  13728. EXP field.  The two possible formats thus correspond to:
  13729.     FORE  .  AFT
  13730. and to:
  13731.     FORE  .  AFT  E  EXP
  13732. without  any  spaces  between  these  fields.   The  FORE field may include
  13733. leading spaces, and a minus sign  for  negative  values.    The  AFT  field
  13734. includes only decimal digits (possibly with trailing zeros).  The EXP field
  13735. includes  the  sign (plus or minus) and the exponent (possibly with leading
  13736. zeros).
  13737. For floating point types, the default lengths of these fields  are  defined
  13738. by  the  following  variables  that  are  declared  in  the generic package
  13739. FLOAT_IO:
  13740.     DEFAULT_FORE : \vFIELD\v1413. := 2;
  13741.     DEFAULT_AFT  : FIELD := NUM'DIGITS-1;
  13742.     DEFAULT_EXP  : FIELD := 3;
  13743. For fixed point types, the default lengths of these fields are  defined  by
  13744. the  following variables that are declared in the generic package FIXED_IO:
  13745.     DEFAULT_FORE : FIELD := NUM'FORE;
  13746.     DEFAULT_AFT  : FIELD := NUM'AFT;
  13747.     DEFAULT_EXP  : FIELD := 0;
  13748. The following procedures are provided:
  13749.  \vprocedure GET\v1413.(FILE : \uin\n \vFILE_TYPE\v1401.; ITEM : \uout\n NUM; \vWIDTH\v1413. : \uin\n FIELD := 0);
  13750.  \uprocedure\n GET(ITEM : \uout\n NUM; WIDTH : \uin\n FIELD := 0);
  13751.           If the value of the parameter WIDTH is zero,  skips  any  leading
  13752.           \vblanks\v1413.,  \vline terminators\v1413., or page terminators, then reads a plus
  13753.           or a minus sign if present, then reads according to the syntax of
  13754.           a \vreal literal\v204. (which may be a  \vbased  literal\v206.).   If  a  nonzero
  13755.           value  of  WIDTH  is  supplied, then exactly WIDTH characters are
  13756.           input, or the characters (possibly none) up to a line terminator,
  13757.           whichever comes first;  any skipped leading blanks  are  included
  13758.           in the count.
  13759.           Returns,  in  the  parameter  ITEM,  the  value  of type NUM that
  13760.           corresponds to the sequence input.
  13761.           The \vexception DATA_ERROR\v1413. is raised if the sequence input does not
  13762.           have the required syntax or if the value obtained is not  of  the
  13763.           subtype NUM.
  13764.     \vprocedure PUT\v1413.(FILE : \uin\n FILE_TYPE;
  13765.                   ITEM : \uin\n NUM;
  13766.                   FORE : \uin\n FIELD := DEFAULT_FORE;
  13767.                   AFT  : \uin\n FIELD := DEFAULT_AFT;
  13768.                   EXP  : \uin\n FIELD := DEFAULT_EXP);
  13769.     \uprocedure\n PUT(ITEM : \uin\n NUM;
  13770.                   FORE : \uin\n FIELD := DEFAULT_FORE;
  13771.                   AFT  : \uin\n FIELD := DEFAULT_AFT;
  13772.                   EXP  : \uin\n FIELD := DEFAULT_EXP);
  13773.           Outputs the value of the parameter ITEM as a decimal literal with
  13774.           the  format  defined  by  FORE,  AFT  and  EXP.   If the value is
  13775.           negative, a minus sign is included in the integer part.   If  EXP
  13776.           has  the  value  zero,  then the integer part to be output has as
  13777.           many digits as are needed to represent the integer  part  of  the
  13778.           value  of  ITEM, overriding FORE if necessary, or consists of the
  13779.           digit zero if the value of ITEM has no integer part.
  13780.           If EXP has a value greater than zero, then the integer part to be
  13781.           output has a single digit, which is nonzero except for the  value
  13782.           0.0 of ITEM.
  13783.           In  both  cases,  however,  if  the integer part to be output has
  13784.           fewer than  FORE  characters,  including  any  minus  sign,  then
  13785.           leading  spaces  are first output to make up the difference.  The
  13786.           number of digits of the fractional part is given by  AFT,  or  is
  13787.           one  if  AFT  equals  zero.   The  value  is rounded;  a value of
  13788.           exactly one half in the last place may be rounded  either  up  or
  13789.           down.
  13790.           If EXP has the value zero, there is no exponent part.  If EXP has
  13791.           a  value  greater  than zero, then the exponent part to be output
  13792.           has as many digits as are needed to represent the  exponent  part
  13793.           of  the  value  of ITEM (for which a single digit integer part is
  13794.           used), and includes an initial  sign (plus  or  minus).   If  the
  13795.           exponent  part  to  be  output  has  fewer  than  EXP characters,
  13796.           including the sign, then leading zeros  precede  the  digits,  to
  13797.           make  up the difference.  For the value 0.0 of ITEM, the exponent
  13798.           has the value zero.
  13799.     \uprocedure\n GET(FROM : \uin\n STRING; ITEM : \uout\n NUM; LAST : \uout\n POSITIVE);
  13800.           Reads a real value  from  the  beginning  of  the  given  string,
  13801.           following  the  same  rule as the GET procedure that reads a real
  13802.           value from a file, but treating the end of the string as  a  file
  13803.           terminator.   Returns,  in  the parameter ITEM, the value of type
  13804.           NUM that corresponds to the sequence input.  Returns in LAST  the
  13805.           index value such that FROM(LAST) is the last character read.
  13806.           The exception DATA_ERROR is raised if the sequence input does not
  13807.           have  the required syntax, or if the value obtained is not of the
  13808.           subtype NUM.
  13809.     \uprocedure\n PUT(TO   : \uout\n STRING;
  13810.                   ITEM : \uin\n NUM;
  13811.                   AFT  : \uin\n FIELD := DEFAULT_AFT;
  13812.                   EXP  : \uin\n INTEGER := DEFAULT_EXP);
  13813.           Outputs the value of the parameter  ITEM  to  the  given  string,
  13814.           following  the  same  rule as for output to a file, using a value
  13815.           for FORE such that the  sequence  of  characters  output  exactly
  13816.           fills the string, including any leading spaces.
  13817. \uExamples:\n
  13818.     \upackage\n REAL_IO \uis new\n FLOAT_IO(REAL); \uuse\n REAL_IO;
  13819.     -- default format used at instantiation, DEFAULT_EXP = 3
  13820.     X : REAL := -123.4567;  --  digits 8      (see 3.5.7)
  13821.     PUT(X); -- default format                   "-1.2345670E+02"
  13822.     PUT(X, FORE => 5, AFT => 3, EXP => 2);  --  "bbb-1.235E+2"
  13823.     PUT(X, 5, 3, 0);                        --  "b-123.457"
  13824. Note:
  13825. For  an item with a positive value, if output to a string exactly fills the
  13826. string without leading spaces, then output of  the  corresponding  negative
  13827. value will raise \vLAYOUT_ERROR\v1413..
  13828. :1417
  13829. 14.3.9  \uInput-Output for Enumeration Types\n
  13830. The following procedures are defined in the generic \vpackage ENUMERATION_IO\v1418.,
  13831. which must be instantiated for the appropriate enumeration type  (indicated
  13832. by ENUM in the specification).
  13833. Values are output using either upper or lower case letters for identifiers.
  13834. This  is  specified  by the parameter SET, which is of the enumeration type
  13835. TYPE_SET.
  13836.     \utype\n TYPE_SET \uis\n (LOWER_CASE, UPPER_CASE);
  13837. The format (which includes any trailing spaces)  can  be  specified  by  an
  13838. optional  field  \vwidth\v1413.  parameter.  The default field width and letter case
  13839. are defined by the following variables that are  declared  in  the  generic
  13840. package ENUMERATION_IO:
  13841.     DEFAULT_WIDTH   : \vFIELD\v1413. := 0;
  13842.     DEFAULT_SETTING : TYPE_SET := UPPER_CASE;
  13843. The following procedures are provided:
  13844.     \vprocedure GET\v1413.(FILE : \uin\n \vFILE_TYPE\v1401.; ITEM : \uout\n ENUM);
  13845.     \uprocedure\n GET(ITEM : \uout\n ENUM);
  13846.           After  \vskipping\v1413.  any  leading  \vblanks\v1413.,  \vline terminators\v1413., or page
  13847.           terminators, reads an identifier according to the syntax of  this
  13848.           lexical   element   (lower   and   upper  case  being  considered
  13849.           equivalent), or a character literal according to  the  syntax  of
  13850.           this  lexical  element  (including the apostrophes).  Returns, in
  13851.           the parameter ITEM, the value of type ENUM  that  corresponds  to
  13852.           the sequence input.
  13853.           The exception \vDATA_ERROR\v1413. is raised if the sequence input does not
  13854.           have  the  required  syntax,  or  if  the identifier or character
  13855.           literal does not correspond to a value of the subtype ENUM.
  13856.     \vprocedure PUT\v1413.(FILE  : \uin\n FILE_TYPE;
  13857.                   ITEM  : \uin\n ENUM;
  13858.                   WIDTH : \uin\n FIELD := DEFAULT_WIDTH;
  13859.                   SET   : \uin\n TYPE_SET := DEFAULT_SETTING);
  13860.     \uprocedure\n PUT(ITEM  : \uin\n ENUM;
  13861.                   WIDTH : \uin\n FIELD := DEFAULT_WIDTH;
  13862.                   SET   : \uin\n TYPE_SET := DEFAULT_SETTING);
  13863.           Outputs the value of the parameter ITEM as an enumeration literal
  13864.           (either an identifier or  a  character  literal).   The  optional
  13865.           parameter  SET indicates whether lower case or upper case is used
  13866.           for identifiers;  it has no effect for  character  literals.   If
  13867.           the   sequence  of  characters  produced  has  fewer  than  WIDTH
  13868.           characters, then trailing spaces are finally output  to  make  up
  13869.           the difference.
  13870.     \uprocedure\n GET(FROM : \uin\n STRING; ITEM : \uout\n ENUM; LAST : \uout\n POSITIVE);
  13871.           Reads  an  enumeration  value  from  the  beginning  of the given
  13872.           string, following the same rule as the GET  procedure that  reads
  13873.           an  enumeration  value  from  a file, but treating the end of the
  13874.           string as a file terminator.  Returns, in the parameter ITEM, the
  13875.           value of type  ENUM  that  corresponds  to  the  sequence  input.
  13876.           Returns  in LAST the index value such that FROM(LAST) is the last
  13877.           character read.
  13878.           The exception DATA_ERROR is raised if the sequence input does not
  13879.           have the required syntax,  or  if  the  identifier  or  character
  13880.           literal does not correspond to a value of the subtype ENUM.
  13881.     \uprocedure\n PUT(TO   : \uout\n STRING;
  13882.                   ITEM : \uin\n ENUM;
  13883.                   SET  : \uin\n TYPE_SET := DEFAULT_SETTING);
  13884.           Outputs  the  value  of  the  parameter ITEM to the given string,
  13885.           following the same rule as for output to a file, using the length
  13886.           of the given string as the value for WIDTH.
  13887. Although the  specification  of  the  package  ENUMERATION_IO  would  allow
  13888. instantiation for an integer type, this is not the intended purpose of this
  13889. generic  package,  and  the effect of such instantiations is not defined by
  13890. the language.
  13891. \uNotes:\n
  13892. There  is  a  difference  between  PUT  defined  for  characters,  and  for
  13893. enumeration values.  Thus
  13894.     TEXT_IO.PUT('A');  --  outputs the character A
  13895.     package CHAR_IO is new TEXT_IO.ENUMERATION_IO(CHARACTER);
  13896.     CHAR_IO.PUT('A');  --  outputs the character 'A', between single quotes
  13897. The  type  BOOLEAN  is  an  enumeration  type,  hence ENUMERATION_IO can be
  13898. instantiated for this type.
  13899. :1418
  13900. 14.3.10  \uSpecification of the Package Text_IO\n
  13901.     \uwith\n IO_EXCEPTIONS;
  13902.     \upackage\n TEXT_IO \uis\n
  13903.        \utype\n FILE_TYPE \uis limited private\n;
  13904.        \utype\n FILE_MODE \uis\n (IN_FILE, OUT_FILE);
  13905.        \utype\n COUNT \uis range\n 0 .. implementation defined;
  13906.        \usubtype\n POSITIVE_COUNT is COUNT \urange\n 1 .. COUNT'LAST;
  13907.        UNBOUNDED : \uconstant\n COUNT := 0; -- line and page length
  13908.        \usubtype\n FIELD       \uis\n INTEGER \urange\n 0 .. implementation defined;
  13909.        \usubtype\n NUMBER_BASE \uis\n INTEGER \urange\n 2 .. 16;
  13910.        \utype\n TYPE_SET \uis\n (LOWER_CASE, UPPER_CASE);
  13911.        -- File Management
  13912.        procedure CREATE (FILE : in out FILE_TYPE;
  13913.                          MODE : in FILE_MODE := OUT_FILE;
  13914.                          NAME : in STRING    := "";
  13915.                          FORM : in STRING    := "");
  13916.        procedure OPEN   (FILE : in out FILE_TYPE;
  13917.                          MODE : in FILE_MODE;
  13918.                          NAME : in STRING;
  13919.                          FORM : in STRING := "");
  13920.        procedure CLOSE  (FILE : in out FILE_TYPE);
  13921.        procedure DELETE (FILE : in out FILE_TYPE);
  13922.        procedure RESET  (FILE : in out FILE_TYPE; MODE : in FILE_MODE);
  13923.        procedure RESET  (FILE : in out FILE_TYPE);
  13924.        function  MODE   (FILE : in FILE_TYPE) return FILE_MODE;
  13925.        function  NAME   (FILE : in FILE_TYPE) return STRING;
  13926.        function  FORM   (FILE : in FILE_TYPE) return STRING;
  13927.        function  IS_OPEN(FILE : in FILE_TYPE) return BOOLEAN;
  13928.        -- Control of default input and output files
  13929.        procedure SET_INPUT (FILE : in FILE_TYPE);
  13930.        procedure SET_OUTPUT(FILE : in FILE_TYPE);
  13931.        function STANDARD_INPUT  return FILE_TYPE;
  13932.        function STANDARD_OUTPUT return FILE_TYPE;
  13933.        function CURRENT_INPUT   return FILE_TYPE;
  13934.        function CURRENT_OUTPUT  return FILE_TYPE;
  13935.        -- Specification of line and page lengths
  13936.        procedure SET_LINE_LENGTH(FILE : in FILE_TYPE; TO : in COUNT);
  13937.        procedure SET_LINE_LENGTH(TO : in COUNT);
  13938.        procedure SET_PAGE_LENGTH(FILE : in FILE_TYPE; TO : in COUNT);
  13939.        procedure SET_PAGE_LENGTH(TO : in COUNT);
  13940.        function  LINE_LENGTH(FILE : in FILE_TYPE) return COUNT;
  13941.        function  LINE_LENGTH return COUNT;
  13942.        function  PAGE_LENGTH(FILE : in FILE_TYPE) return COUNT;
  13943.        function  PAGE_LENGTH return COUNT;
  13944.        -- Column, Line, and Page Control
  13945. procedure NEW_LINE (FILE : in FILE_TYPE; SPACING : in POSITIVE_COUNT := 1);
  13946. procedure NEW_LINE (SPACING : in POSITIVE_COUNT := 1);
  13947. procedure SKIP_LINE (FILE : in FILE_TYPE; SPACING :in POSITIVE_COUNT := 1);
  13948. procedure SKIP_LINE  (SPACING : in POSITIVE_COUNT := 1);
  13949.        function  END_OF_LINE(FILE : in FILE_TYPE) return BOOLEAN;
  13950.        function  END_OF_LINE return BOOLEAN;
  13951.        procedure NEW_PAGE   (FILE : in FILE_TYPE);
  13952.        procedure NEW_PAGE;
  13953.        procedure SKIP_PAGE  (FILE : in FILE_TYPE);
  13954.        procedure SKIP_PAGE;
  13955.        function  END_OF_PAGE(FILE : in FILE_TYPE) return BOOLEAN;
  13956.        function  END_OF_PAGE return BOOLEAN;
  13957.        function  END_OF_FILE(FILE : in FILE_TYPE) return BOOLEAN;
  13958.        function  END_OF_FILE return BOOLEAN;
  13959.        procedure SET_COL (FILE : in FILE_TYPE; TO : in POSITIVE_COUNT);
  13960.        procedure SET_COL (TO   : in POSITIVE_COUNT);
  13961.        procedure SET_LINE(FILE : in FILE_TYPE; TO : in POSITIVE_COUNT);
  13962.        procedure SET_LINE(TO   : in POSITIVE_COUNT);
  13963.        function COL (FILE : in FILE_TYPE) return POSITIVE_COUNT;
  13964.        function COL  return POSITIVE_COUNT;
  13965.        function LINE(FILE : in FILE_TYPE) return POSITIVE_COUNT;
  13966.        function LINE return POSITIVE_COUNT;
  13967.        function PAGE(FILE : in FILE_TYPE) return POSITIVE_COUNT;
  13968.        function PAGE return POSITIVE_COUNT;
  13969.        -- Character Input-Output
  13970.        procedure GET(FILE : in  FILE_TYPE; ITEM : out CHARACTER);
  13971.        procedure GET(ITEM : out CHARACTER);
  13972.        procedure PUT(FILE : in  FILE_TYPE; ITEM : in CHARACTER);
  13973.        procedure PUT(ITEM : in  CHARACTER);
  13974.        -- String Input-Output
  13975.        procedure GET(FILE : in  FILE_TYPE; ITEM : out STRING);
  13976.        procedure GET(ITEM : out STRING);
  13977.        procedure PUT(FILE : in  FILE_TYPE; ITEM : in STRING);
  13978.        procedure PUT(ITEM : in  STRING);
  13979.        procedure GET_LINE(FILE : in  FILE_TYPE; ITEM : out STRING; LAST :
  13980.          out NATURAL);
  13981.        procedure GET_LINE(ITEM : out STRING; LAST : out NATURAL);
  13982.        procedure PUT_LINE(FILE : in  FILE_TYPE; ITEM : in STRING);
  13983.        procedure PUT_LINE(ITEM : in  STRING);
  13984.        -- Generic package for Input-Output of Integer Types
  13985.        generic
  13986.           type NUM is range <>;
  13987.        package INTEGER_IO is
  13988.           DEFAULT_WIDTH : FIELD := NUM'WIDTH;
  13989.           DEFAULT_BASE  : NUMBER_BASE := 10;
  13990. procedure GET(FILE : in  FILE_TYPE; ITEM : out NUM; WIDTH : in FIELD := 0);
  13991.           procedure GET(ITEM : out NUM; WIDTH : in FIELD := 0);
  13992.           procedure PUT(FILE  : in FILE_TYPE;
  13993.                         ITEM  : in NUM;
  13994.                         WIDTH : in FIELD := DEFAULT_WIDTH;
  13995.                         BASE  : in NUMBER_BASE := DEFAULT_BASE);
  13996.           procedure PUT(ITEM  : in NUM;
  13997.                         WIDTH : in FIELD := DEFAULT_WIDTH;
  13998.                         BASE  : in NUMBER_BASE := DEFAULT_BASE);
  13999.      procedure GET(FROM : in  STRING; ITEM : out NUM; LAST : out POSITIVE);
  14000.      procedure PUT(TO   : out STRING;
  14001.                         ITEM : in NUM;
  14002.                         BASE : in NUMBER_BASE := DEFAULT_BASE);
  14003.      end INTEGER_IO;
  14004.        -- Generic packages for Input-Output of Real Types
  14005.        generic
  14006.           type NUM is digits <>;
  14007.        package FLOAT_IO is
  14008.           DEFAULT_FORE : FIELD := 2;
  14009.           DEFAULT_AFT  : FIELD := NUM'DIGITS-1;
  14010.           DEFAULT_EXP  : FIELD := 3;
  14011.  procedure GET(FILE : in FILE_TYPE; ITEM : out NUM; WIDTH : in FIELD := 0);
  14012.         procedure GET(ITEM : out NUM; WIDTH : in FIELD := 0);
  14013.         procedure PUT(FILE : in FILE_TYPE;
  14014.                       ITEM : in NUM;
  14015.                       FORE : in FIELD := DEFAULT_FORE;
  14016.                       AFT  : in FIELD := DEFAULT_AFT;
  14017.                       EXP  : in FIELD := DEFAULT_EXP);
  14018.         procedure PUT(ITEM : in NUM;
  14019.                       FORE : in FIELD := DEFAULT_FORE;
  14020.                       AFT  : in FIELD := DEFAULT_AFT;
  14021.                       EXP  : in FIELD := DEFAULT_EXP);
  14022.       procedure GET(FROM : in STRING; ITEM : out NUM; LAST : out POSITIVE);
  14023.           procedure PUT(TO   : out STRING;
  14024.                         ITEM : in NUM;
  14025.                         AFT  : in FIELD := DEFAULT_AFT;
  14026.                         EXP  : in FIELD := DEFAULT_EXP);
  14027.        end FLOAT_IO;
  14028.        generic
  14029.           type NUM is delta <>;
  14030.        package FIXED_IO is
  14031.           DEFAULT_FORE : FIELD := NUM'FORE;
  14032.           DEFAULT_AFT  : FIELD := NUM'AFT;
  14033.           DEFAULT_EXP  : FIELD := 0;
  14034.  procedure GET(FILE : in FILE_TYPE; ITEM : out NUM; WIDTH : in FIELD := 0);
  14035.           procedure GET(ITEM : out NUM; WIDTH : in FIELD := 0);
  14036.           procedure PUT(FILE : in FILE_TYPE;
  14037.                         ITEM : in NUM;
  14038.                         FORE : in FIELD := DEFAULT_FORE;
  14039.                         AFT  : in FIELD := DEFAULT_AFT;
  14040.                         EXP  : in FIELD := DEFAULT_EXP);
  14041.           procedure PUT(ITEM : in NUM;
  14042.                         FORE : in FIELD := DEFAULT_FORE;
  14043.                         AFT  : in FIELD := DEFAULT_AFT;
  14044.                         EXP  : in FIELD := DEFAULT_EXP);
  14045.      procedure GET(FROM : in  STRING; ITEM : out NUM; LAST : out POSITIVE);
  14046.           procedure PUT(TO   : out STRING;
  14047.                         ITEM : in NUM;
  14048.                         AFT  : in FIELD := DEFAULT_AFT;
  14049.                         EXP  : in FIELD := DEFAULT_EXP);
  14050.        end FIXED_IO;
  14051.        -- Generic package for Input-Output of Enumeration Types
  14052.        generic
  14053.           type ENUM is (<>);
  14054.        package ENUMERATION_IO is
  14055.           DEFAULT_WIDTH   : FIELD := 0;
  14056.           DEFAULT_SETTING : TYPE_SET := UPPER_CASE;
  14057.           procedure GET(FILE  : in FILE_TYPE; ITEM : out ENUM);
  14058.           procedure GET(ITEM  : out ENUM);
  14059.           procedure PUT(FILE  : in FILE_TYPE;
  14060.                         ITEM  : in ENUM;
  14061.                         WIDTH : in FIELD    := DEFAULT_WIDTH;
  14062.                         SET   : in TYPE_SET := DEFAULT_SETTING);
  14063.           procedure PUT(ITEM  : in ENUM;
  14064.                         WIDTH : in FIELD    := DEFAULT_WIDTH;
  14065.                         SET   : in TYPE_SET := DEFAULT_SETTING);
  14066.     procedure GET(FROM : in  STRING; ITEM : out ENUM; LAST : out POSITIVE);
  14067.           procedure PUT(TO   : out STRING;
  14068.                         ITEM : in  ENUM;
  14069.                         SET  : in  TYPE_SET := DEFAULT_SETTING);
  14070.        end ENUMERATION_IO;
  14071.     -- Exceptions
  14072.        STATUS_ERROR : \uexception renames\n IO_EXCEPTIONS.STATUS_ERROR;
  14073.        MODE_ERROR   : \uexception renames\n IO_EXCEPTIONS.MODE_ERROR;
  14074.        NAME_ERROR   : \uexception renames\n IO_EXCEPTIONS.NAME_ERROR;
  14075.        USE_ERROR    : \uexception renames\n IO_EXCEPTIONS.USE_ERROR;
  14076.        DEVICE_ERROR : \uexception renames\n IO_EXCEPTIONS.DEVICE_ERROR;
  14077.        END_ERROR    : \uexception renames\n IO_EXCEPTIONS.END_ERROR;
  14078.        DATA_ERROR   : \uexception renames\n IO_EXCEPTIONS.DATA_ERROR;
  14079.        LAYOUT_ERROR : \uexception renames\n IO_EXCEPTIONS.LAYOUT_ERROR;
  14080.     \uprivate\n
  14081.        -- implementation-dependent
  14082.     \uend\n TEXT_IO;
  14083. :1419
  14084. 14.4  \uExceptions in Input-Output\n
  14085. The following exceptions can be raised by  input-output  operations.   They
  14086. are  declared  in the \vpackage IO_EXCEPTIONS\v1420., defined in section 14.5;  this
  14087. package is named in the context clause for each of the  three  input-output
  14088. packages.   Only  outline  descriptions  are  given of the conditions under
  14089. which NAME_ERROR, USE_ERROR, and DEVICE_ERROR are raised;  for full details
  14090. see Appendix F.  If more than one error condition exists, the corresponding
  14091. exception that appears earliest in the following list is the  one  that  is
  14092. raised.
  14093. The  exception  STATUS_ERROR is raised by an attempt to operate upon a \vfile\v1401.
  14094. that is not open, and by an attempt to open a file that is already open.
  14095. The exception MODE_ERROR is raised by an attempt to read from, or test  for
  14096. the  end  of, a file whose current mode is \vOUT_FILE\v1401., and also by an attempt
  14097. to write to a file whose current mode is \vIN_FILE\v1401..  In the case of  TEXT_IO,
  14098. the  exception MODE_ERROR is also raised by specifying a file whose current
  14099. mode is OUT_FILE in a call of \vSET_INPUT\v1410., \vSKIP_LINE\v1412., \vEND_OF_LINE\v1412., \vSKIP_PAGE\v1412.,
  14100. or \vEND_OF_PAGE\v1412.;  and by specifying a file whose current mode is IN_FILE  in
  14101. a   call  of  \vSET_OUTPUT\v1410.,  \vSET_LINE_LENGTH\v1411.,  \vSET_PAGE_LENGTH\v1411.,  \vLINE_LENGTH\v1412.,
  14102. \vPAGE_LENGTH\v1412., \vNEW_LINE\v1412., or \vNEW_PAGE\v1412..
  14103. The exception NAME_ERROR is raised by a call  of  CREATE  or  \vOPEN\v1403.  if  the
  14104. string given for the parameter \vNAME\v1401. does not allow the identification of an
  14105. \vexternal  file\v1401..   For  example,  this  exception is raised if the string is
  14106. improper, or, alternatively, if either none or more than one external  file
  14107. corresponds to the string.
  14108. The  exception USE_ERROR is raised if an operation is attempted that is not
  14109. possible for reasons that depend on characteristics of the  external  file.
  14110. For  example, this exception is raised by the \vprocedure CREATE\v1403., among other
  14111. circumstances, if the given mode is OUT_FILE  but  the  form  specifies  an
  14112. input  only  device, if the parameter FORM specifies invalid access rights,
  14113. or if an external file with the given name already exists  and  overwriting
  14114. is not allowed.
  14115. The exception DEVICE_ERROR is raised if an input-output operation cannot be
  14116. completed because of a malfunction of the underlying system.
  14117. The exception END_ERROR is raised by an attempt to skip (read past) the end
  14118. of a file.
  14119. The exception DATA_ERROR may be raised by the \vprocedure READ\v1404. if the element
  14120. read cannot be interpreted as a value of the required type.  This exception
  14121. is  also  raised by a \vprocedure GET\v1413. (defined in the \vpackage TEXT_IO\v1408.) if the
  14122. input character sequence fails to satisfy the required syntax,  or  if  the
  14123. value  input  does not belong to the range of the required type or subtype.
  14124. The exception LAYOUT_ERROR is raised (in text input-output) by  \vCOL\v1412.,  \vLINE\v1412.,
  14125. or   \vPAGE\v1412.   if  the  value  returned  exceeds  COUNT'LAST.   The  exception
  14126. LAYOUT_ERROR is also raised on output by an attempt to set column  or  line
  14127. numbers  in  excess of specified maximum line or page lengths, respectively
  14128. (excluding the unbounded cases).  It is also raised by an attempt   to  \vPUT\v1413.
  14129. too many characters to a string.
  14130. :1420
  14131. 14.5  \uSpecification of the Package IO_Exceptions\n
  14132. This  package  defines the exceptions needed by the packages SEQUENTIAL_IO,
  14133. DIRECT_IO, and TEXT_IO.
  14134.     \upackage\n IO_EXCEPTIONS \uis\n
  14135.        STATUS_ERROR : \uexception\n;
  14136.        MODE_ERROR   : \uexception\n;
  14137.        NAME_ERROR   : \uexception\n;
  14138.        USE_ERROR    : \uexception\n;
  14139.        DEVICE_ERROR : \uexception\n;
  14140.        END_ERROR    : \uexception\n;
  14141.        DATA_ERROR   : \uexception\n;
  14142.        LAYOUT_ERROR : \uexception\n;
  14143.     \uend\n IO_EXCEPTIONS;
  14144. :1421
  14145. 14.6  \uLow Level Input-Output\n
  14146. A low level input-output operation is an operation  acting  on  a  physical
  14147. device.   Such  an  operation  is  handled by using one of the (overloaded)
  14148. predefined procedures SEND_CONTROL and RECEIVE_CONTROL.
  14149. A procedure SEND_CONTROL may be used  to  send  control  information  to  a
  14150. physical  device.   A  procedure RECEIVE_CONTROL may be used to monitor the
  14151. execution of an input-output operation by requesting information  from  the
  14152. physical device.
  14153. Such  procedures are declared in the standard package LOW_LEVEL_IO and have
  14154. two parameters identifying the device and the data.  However, the kinds and
  14155. formats  of  the  control  information  will   depend   on   the   physical
  14156. characteristics  of  the  machine  and the device.  Hence, the types of the
  14157. parameters are implementation-defined.   Overloaded  definitions  of  these
  14158. procedures should be provided for the supported devices.
  14159. The  visible  part  of the package defining these procedures is outlined as
  14160. follows:
  14161.  \upackage\n LOW_LEVEL_IO \uis\n
  14162.     --  declarations of the possible types for DEVICE and DATA;
  14163.     --  declarations of overloaded procedures for these types:
  14164.  \uprocedure\n SEND_CONTROL    (DEVICE : device_type; DATA : \uin out\n data_type);
  14165.  \uprocedure\n RECEIVE_CONTROL (DEVICE : device_type; DATA : \uin out\n data_type);
  14166.  end;
  14167. The bodies of the procedures SEND_CONTROL and RECEIVE_CONTROL  for  various
  14168. devices  can  be  supplied  in the body of the package LOW_LEVEL_IO.  These
  14169. procedure bodies may be written with code statements.
  14170. :1422
  14171. 14.7  \uExample of Input-Output\n
  14172. The following example shows the  use  of  some  of  the  text  input-output
  14173. facilities  in  a dialogue with a user at a terminal.  The user is prompted
  14174. to type a color, and the program responds by giving the number of items  of
  14175. that  color  available  in  stock,  according to an inventory.  The default
  14176. input and output  files  are  used.   For  simplicity,  all  the  requisite
  14177. instantiations  are  given  within one subprogram;  in practice, a package,
  14178. separate from the procedure, would be used.
  14179.   \uwith\n TEXT_IO; \uuse\n TEXT_IO;
  14180.   \uprocedure\n DIALOGUE \uis\n
  14181.      \utype\n COLOR \uis\n (WHITE, RED, ORANGE, YELLOW, GREEN, BLUE, BROWN);
  14182.      \upackage\n COLOR_IO \uis new\n ENUMERATION_IO(ENUM => COLOR);
  14183.      \upackage\n NUMBER_IO \uis new\n INTEGER_IO(INTEGER);
  14184.      \uuse\n COLOR_IO, NUMBER_IO;
  14185.      INVENTORY : \uarray\n (COLOR) \uof\n INTEGER := (20, 17, 43, 10, 28, 173, 87);
  14186.      CHOICE : COLOR;
  14187.      \uprocedure\n ENTER_COLOR (SELECTION : \uout\n COLOR) \uis\n
  14188.      \ubegin\n
  14189.         \uloop\n
  14190.            \ubegin\n
  14191.               PUT("Color selected: ");  --  prompts user
  14192.               GET(SELECTION);  --  accepts color typed, or raises exception
  14193.               \ureturn\n;
  14194.            \uexception\n
  14195.               \uwhen\n DATA_ERROR =>
  14196.                  PUT("Invalid color, try again.  ");  --  user has typed
  14197.                  NEW_LINE(2);                         --   new line
  14198.                  --  completes execution of the block statement
  14199.            \uend\n;
  14200.         \uend loop\n;  --  repeats the block statement until color accepted
  14201.      \uend\n;
  14202.   \ubegin\n --  statements of DIALOGUE;
  14203.      NUMBER_IO.DEFAULT_WIDTH := 5;
  14204.      \uloop\n
  14205.         ENTER_COLOR(CHOICE);  --  user types color and new line
  14206.         SET_COL(5);  PUT(CHOICE); PUT(" items available:");
  14207.         SET_COL(40); PUT(INVENTORY(CHOICE));  --  default width is 5
  14208.         NEW_LINE;
  14209.      \uend loop\n;
  14210.   \uend\n DIALOGUE;
  14211. Example of an interaction (characters typed by the user are italicized):
  14212.     Color selected:  \uBlack\n
  14213.     Invalid color, try again.
  14214.     Color selected:  \uBlue\n
  14215.         BLUE items available:         173
  14216.     Color selected:  \uYellow\n
  14217.         YELLOW items available:        10
  14218. :1500
  14219. A.      \uPredefined Language Attributes\n
  14220. This  annex  summarizes  the  definitions given elsewhere of the predefined
  14221. language attributes.
  14222. P'ADDRESS         For a prefix P that denotes an object, a program unit,  a
  14223.                   label, or an entry:
  14224.                   Yields  the  address  of  the  first of the storage units
  14225.                   allocated to P.  For a subprogram, package, task unit, or
  14226.                   label, this value refers to the machine  code  associated
  14227.                   with  the  corresponding body or statement.  For an entry
  14228.                   for which an address clause has  been  given,  the  value
  14229.                   refers  to  the  corresponding  hardware  interrupt.  The
  14230.                   value of this attribute is of the type ADDRESS defined in
  14231.                   the package SYSTEM.  (See 13.7.2.)
  14232. P'AFT             For a prefix P that denotes a fixed point subtype:
  14233.                   Yields the number of  decimal  digits  needed  after  the
  14234.                   point  to  accommodate  the  precision  of the subtype P,
  14235.                   unless the delta of the subtype P is greater than 0.1, in
  14236.                   which case the attribute yields the value one.  (P'AFT is
  14237.                   the smallest positive integer N for which (10**N)*P'DELTA
  14238.                   is greater than or equal to  one.)   The  value  of  this
  14239.                   attribute   is   of  the  type  universal_integer.   (See
  14240.                   3.5.10.)
  14241. P'BASE            For a prefix P that denotes a type or subtype:
  14242.                   This attribute denotes the base type of P.   It  is  only
  14243.                   allowed  as  the prefix of the name of another attribute:
  14244.                   for example, P'BASE'FIRST.  (See 3.3.3.)
  14245. P'CALLABLE        For a prefix P that is appropriate for a task type:
  14246.                   Yields the value FALSE when the execution of the  task  P
  14247.                   is  either  completed  or terminated, or when the task is
  14248.                   abnormal;  yields the value TRUE otherwise.  The value of
  14249.                   this attribute is of the predefined type  BOOLEAN.   (See
  14250.                   9.9.)
  14251. P'CONSTRAINED     For a prefix P that denotes an  object  of  a  type  with
  14252.                   discriminants:
  14253.                   Yields  the  value  TRUE  if  a  discriminant  constraint
  14254.                   applies to the object P, or if the object is  a  constant
  14255.                   (including a formal parameter or generic formal parameter
  14256.                   of  mode in);  yields the value FALSE otherwise.  If P is
  14257.                   a generic formal parameter of mode in out, or if P  is  a
  14258.                   formal  parameter of mode in out or out and the type mark
  14259.                   given  in  the  corresponding   parameter   specification
  14260.                   denotes  an  unconstrained  type with discriminants, then
  14261.                   the value of this attribute is obtained from that of  the
  14262.                   corresponding   actual  parameter.   The  value  of  this
  14263.                   attribute  is  of  the  predefined  type  BOOLEAN.   (See
  14264.                   3.7.4.)
  14265. P'CONSTRAINED     For a prefix P that denotes a private type or subtype:
  14266.                   Yields  the  value  FALSE  if  P denotes an unconstrained
  14267.                   nonformal private type with discriminants;   also  yields
  14268.                   the  value  FALSE  if  P denotes a generic formal private
  14269.                   type and the  associated  actual  subtype  is  either  an
  14270.                   unconstrained type with discriminants or an unconstrained
  14271.                   array  type;  yields the value TRUE otherwise.  The value
  14272.                   of this attribute is  of  the  predefined  type  BOOLEAN.
  14273.                   (See 7.4.2.)
  14274. P'COUNT           For a prefix P that denotes an entry of a task unit:
  14275.                   Yields  the number of entry calls presently queued on the
  14276.                   entry (if the attribute is  evaluated  within  an  accept
  14277.                   statement for the entry P, the count does not include the
  14278.                   calling  task).   The  value  of this attribute is of the
  14279.                   type universal_integer.  (See 9.9.)
  14280. P'DELTA           For a prefix P that denotes a fixed point  subtype:
  14281.                   Yields the value of the  delta  specified  in  the  fixed
  14282.                   accuracy definition for the subtype P.  The value of this
  14283.                   attribute  is  of the type universal_real.  (See 3.5.10.)
  14284. P'DIGITS          For a prefix P that denotes a floating point subtype:
  14285.                   Yields the  number  of  decimal  digits  in  the  decimal
  14286.                   mantissa  of  model  numbers  of  the  subtype  P.  (This
  14287.                   attribute yields the number D  of  section  3.5.7.)   The
  14288.                   value of this attribute is of the type universal_integer.
  14289.                   (See 3.5.8.)
  14290. P'EMAX            For a prefix P that denotes a floating point  subtype:
  14291.                   Yields the largest exponent value in the binary canonical
  14292.                   form  of model numbers of the subtype P.  (This attribute
  14293.                   yields the product 4*B of section 3.5.7.)  The  value  of
  14294.                   this  attribute  is  of the type universal_integer.  (See
  14295.                   3.5.8.)
  14296. P'EPSILON         For a prefix P that denotes a floating point subtype:
  14297.                   Yields the absolute value of the difference  between  the
  14298.                   model number 1.0 and the next model number above, for the
  14299.                   subtype  P.   The  value of this attribute is of the type
  14300.                   universal_real.  (See 3.5.8.)
  14301. P'FIRST           For a prefix P that denotes a scalar type, or  a  subtype
  14302.                   of a scalar type:
  14303.                   Yields the lower bound of P.  The value of this attribute
  14304.                   has the same type as P.  (See 3.5.)
  14305. P'FIRST           For a prefix P that is appropriate for an array type,  or
  14306.                   that denotes a constrained array subtype:
  14307.                   Yields  the  lower  bound  of the first index range.  The
  14308.                   value of this attribute has the same type as  this  lower
  14309.                   bound.  (See 3.6.2 and 3.8.2.)
  14310. P'FIRST(N)        For a prefix P that is appropriate for an array type,  or
  14311.                   that denotes a constrained array subtype:
  14312.                   Yields  the  lower  bound  of  the N-th index range.  The
  14313.                   value of this attribute has the same type as  this  lower
  14314.                   bound.   The  argument  N  must be a static expression of
  14315.                   type universal_integer.  The value of N must be  positive
  14316.                   (nonzero)  and  no greater than the dimensionality of the
  14317.                   array.  (See 3.6.2 and 3.8.2.)
  14318. P'FIRST_BIT       For a prefix P that  denotes  a  component  of  a  record
  14319.                   object:
  14320.                   Yields  the  offset,  from  the start of the first of the
  14321.                   storage units occupied by the component, of the first bit
  14322.                   occupied by the component.  This offset  is  measured  in
  14323.                   bits.   The  value  of  this  attribute  is  of  the type
  14324.                   universal_integer.  (See 13.7.2.)
  14325. P'FORE            For a prefix P that denotes a fixed point subtype:
  14326.                   Yields the minimum number of characters  needed  for  the
  14327.                   integer  part  of the decimal representation of any value
  14328.                   of the subtype P, assuming that the  representation  does
  14329.                   not  include  an  exponent,  but includes a one-character
  14330.                   prefix that is either a minus sign  or  a  space.   (This
  14331.                   minimum  number  does  not  include  superfluous zeros or
  14332.                   underlines, and is at least  two.)   The  value  of  this
  14333.                   attribute   is   of  the  type  universal_integer.   (See
  14334.                   3.5.10.)
  14335. P'IMAGE           For a prefix P that denotes a discrete type  or  subtype:
  14336.                   This  attribute  is  a  function with a single parameter.
  14337.                   The actual parameter X must be a value of the  base  type
  14338.                   of  P.   The  result  type is the predefined type STRING.
  14339.                   The result is the image of the value of  X,  that  is,  a
  14340.                   sequence  of characters representing the value in display
  14341.                   form.  The image of an integer value is the corresponding
  14342.                   decimal  literal;   without  underlines,  leading  zeros,
  14343.                   exponent,  or  trailing spaces;  but with a one character
  14344.                   prefix that is either a minus sign or a space.
  14345.                   The  image  of  an  enumeration  value  is   either   the
  14346.                   corresponding   identifier   in   upper   case   or   the
  14347.                   corresponding  character  literal  (including   the   two
  14348.                   apostrophes);   neither  leading  nor trailing spaces are
  14349.                   included.  The image of a character other than a  graphic
  14350.                   character is implementation-defined.  (See 3.5.5.)
  14351. P'LARGE           For a prefix P that denotes a real subtype:
  14352.                   The attribute yields the largest positive model number of
  14353.                   the  subtype  P.   The  value of this attribute is of the
  14354.                   type universal_real.  (See 3.5.8 and 3.5.10.)
  14355. P'LAST            For a prefix P that denotes a scalar type, or  a  subtype
  14356.                   of a scalar type:
  14357.                   Yields the upper bound of P.  The value of this attribute
  14358.                   has the same type as P.  (See 3.5.)
  14359. P'LAST            For a prefix P that is appropriate for an array type,  or
  14360.                   that denotes a constrained array subtype:
  14361.                   Yields  the  upper  bound  of the first index range.  The
  14362.                   value of this attribute has the same type as  this  upper
  14363.                   bound.  (See 3.6.2 and 3.8.2.)
  14364. P'LAST(N)         For a prefix P that  is  appropriate  for  an array type,
  14365.                   or that denotes a constrained array subtype:
  14366.                   Yields  the  upper  bound  of  the N-th index range.  The
  14367.                   value of this attribute has the same type as  this  upper
  14368.                   bound.   The  argument  N  must be a static expression of
  14369.                   type universal_integer.  The value of N must be  positive
  14370.                   (nonzero)  and  no greater than the dimensionality of the
  14371.                   array.  (See 3.6.2 and 3.8.2.)
  14372. P'LAST_BIT        For  a  prefix  P  that  denotes a component of a  record
  14373.                   object:
  14374.                   Yields  the  offset,  from the start of the first of  the
  14375.                   storage units occupied by the component, of the last  bit
  14376.                   occupied by the component.  This  offset  is  measured in
  14377.                   bits.   The  value  of  this  attribute  is  of  the type
  14378.                   universal_integer.  (See 13.7.2.)
  14379. P'LENGTH          For a prefix P that  is  appropriate  for  an array type,
  14380.                   or  that denotes a constrained array subtype:
  14381.                   Yields the number of values of the first index range
  14382.                   (zero  for  a  null  range).   The  value  of   this
  14383.                   attribute  is  of  the type universal_integer.  (See
  14384.                   3.6.2.)
  14385. P'LENGTH(N)            For a prefix P that  is  appropriate  for  an  array
  14386.                        type,  or  that denotes a constrained array subtype:
  14387.                        Yields the number of values of the N-th index  range
  14388.                        (zero   for  a  null  range).   The  value  of  this
  14389.                        attribute is of  the  type  universal_integer.   The
  14390.                        argument  N  must  be  a  static  expression of type
  14391.                        universal_integer.  The value of N must be  positive
  14392.                        (nonzero)  and no greater than the dimensionality of
  14393.                        the array.  (See 3.6.2 and 3.8.2.)
  14394. P'MACHINE_EMAX         For a prefix P that denotes a floating point type or
  14395.                        subtype:
  14396.                        Yields the largest value of exponent for the machine
  14397.                        representation of the base type of P.  The value  of
  14398.                        this  attribute  is  of  the type universal_integer.
  14399.                        (See 13.7.3.)
  14400. P'MACHINE_EMIN         For a prefix P that denotes a floating point type or
  14401.                        subtype:
  14402.                        Yields  the  smallest  (most  negative)   value   of
  14403.                        exponent  for the machine representation of the base
  14404.                        type of P.  The value of this attribute  is  of  the
  14405.                        type universal_integer.  (See 13.7.3.)
  14406. P'MACHINE_MANTISSA     For a prefix P that denotes a floating point type or
  14407.                        subtype:
  14408.                        Yields  the number of digits in the mantissa for the
  14409.                        machine representation of the base type  of  P  (the
  14410.                        digits  are  extended  digits  in  the  range  0  to
  14411.                        P'MACHINE_RADIX - 1).  The value of  this  attribute
  14412.                        is of the type universal_integer.  (See 13.7.3.)
  14413. P'MACHINE_OVERFLOWS    For a prefix P that denotes a real type or  subtype:
  14414.                        Yields  the value TRUE if every predefined operation
  14415.                        on values of the base type of P  either  provides  a
  14416.                        correct    result,    or    raises   the   exception
  14417.                        NUMERIC_ERROR in overflow  situations;   yields  the
  14418.                        value  FALSE otherwise.  The value of this attribute
  14419.                        is of the predefined type BOOLEAN.  (See 13.7.3.)
  14420. P'MACHINE_RADIX        For a prefix P that denotes a floating point type or
  14421.                        subtype:
  14422.                        Yields the value of the radix used  by  the  machine
  14423.                        representation  of the base type of P.  The value of
  14424.                        this attribute is  of  the  type  universal_integer.
  14425.                        (See 13.7.3.)
  14426. P'MACHINE_ROUNDS       For a prefix P that denotes a real type or  subtype:
  14427.                        Yields the value TRUE if every predefined arithmetic
  14428.                        operation  on  values  of  the base type of P either
  14429.                        returns  an  exact  result  or  performs   rounding;
  14430.                        yields the value FALSE otherwise.  The value of this
  14431.                        attribute  is  of the predefined type BOOLEAN.  (See
  14432.                        13.7.3.)
  14433. P'MANTISSA             For a prefix P that denotes a real subtype:
  14434.                        Yields the number of binary  digits  in  the  binary
  14435.                        mantissa  of  model numbers of the subtype P.  (This
  14436.                        attribute yields the number B of section 3.5.7 for a
  14437.                        floating point type, or of section 3.5.9 for a fixed
  14438.                        point type.)  The value of this attribute is of  the
  14439.                        type universal_integer.  (See 3.5.8 and 3.5.10.)
  14440. P'POS                  For a prefix P  that  denotes  a  discrete  type  or
  14441.                        subtype:
  14442.                        This   attribute   is   a  function  with  a  single
  14443.                        parameter.  The actual parameter X must be  a  value
  14444.                        of  the base type of P.  The result type is the type
  14445.                        universal_integer.   The  result  is  the   position
  14446.                        number  of  the value of the actual parameter.  (See
  14447.                        3.5.5.)
  14448. P'POSITION             For a prefix P that denotes a component of a  record
  14449.                        object:
  14450.                        Yields  the  offset,  from  the  start  of the first
  14451.                        storage unit occupied by the record, of the first of
  14452.                        the storage units occupied by the  component.   This
  14453.                        offset  is  measured in storage units.  The value of
  14454.                        this attribute is  of  the  type  universal_integer.
  14455.                        (See 13.7.2.)
  14456. P'PRED                 For a prefix P  that  denotes  a  discrete  type  or
  14457.                        subtype:
  14458.                        This   attribute   is   a  function  with  a  single
  14459.                        parameter.  The actual parameter X must be  a  value
  14460.                        of  the base type of P.  The result type is the base
  14461.                        type of P.  The result is the value  whose  position
  14462.                        number  is  one  less than that of X.  The exception
  14463.                        CONSTRAINT_ERROR is raised if X equals P'BASE'FIRST.
  14464.                        (See 3.5.5.)
  14465. P'RANGE                For a prefix P that  is  appropriate  for  an  array
  14466.                        type,  or  that denotes a constrained array subtype:
  14467.                        Yields the first index range  of  P,  that  is,  the
  14468.                        range P'FIRST .. P'LAST.  (See 3.6.2.)
  14469. P'RANGE(N)             For a prefix P that  is  appropriate  for  an  array
  14470.                        type,  or  that denotes a constrained array subtype:
  14471.                        Yields the N-th index range of P, that is, the range
  14472.                        P'FIRST(N) .. P'LAST(N).  (See 3.6.2.)
  14473. P'SAFE_EMAX            For a prefix P that denotes a floating point type or
  14474.                        subtype:
  14475.                        Yields the largest  exponent  value  in  the  binary
  14476.                        canonical  form  of safe numbers of the base type of
  14477.                        P.  (This attribute yields the number E  of  section
  14478.                        3.5.7.)   The value of this attribute is of the type
  14479.                        universal_integer.  (See 3.5.8.)
  14480. P'SAFE_LARGE           For a prefix P that denotes a real type or  subtype:
  14481.                        Yields  the largest positive safe number of the base
  14482.                        type of P.  The value of this attribute  is  of  the
  14483.                        type universal_real.  (See 3.5.8 and 3.5.10.)
  14484. P'SAFE_SMALL           For a prefix P that denotes a real type or  subtype:
  14485.                        Yields  the  smallest positive (nonzero) safe number
  14486.                        of the base type of P.  The value of this  attribute
  14487.                        is  of  the  type  universal_real.   (See  3.5.8 and
  14488.                        3.5.10.)
  14489. P'SIZE                 For a prefix P that denotes an object:
  14490.                        Yields the number of  bits  allocated  to  hold  the
  14491.                        object.   The value of this attribute is of the type
  14492.                        universal_integer.  (See 13.7.2.)
  14493. P'SIZE                 For a prefix P that denotes any type or subtype:
  14494.                        Yields the minimum number of bits that is needed  by
  14495.                        the  implementation  to  hold any possible object of
  14496.                        the type or subtype P.  The value of this  attribute
  14497.                        is of the type universal_integer.  (See 13.7.2.)
  14498. P'SMALL                For a prefix P that denotes a real  subtype:
  14499.                        Yields  the smallest positive (nonzero) model number
  14500.                        of the subtype P.  The value of this attribute is of
  14501.                        the type universal_real.  (See 3.5.8 and 3.5.10.)
  14502. P'STORAGE_SIZE         For a prefix  P  that  denotes  an  access  type  or
  14503.                        subtype:
  14504.                        Yields  the  total  number of storage units reserved
  14505.                        for the collection associated with the base type  of
  14506.                        P.   The  value  of  this  attribute  is of the type
  14507.                        universal_integer.  (See 13.7.2.)
  14508. P'STORAGE_SIZE         For a prefix P that denotes a task type  or  a  task
  14509.                        object:
  14510.                        Yields the number of storage units reserved for each
  14511.                        activation  of  a  task  of  the  type  P or for the
  14512.                        activation of the task object P.  The value of  this
  14513.                        attribute  is  of  the type universal_integer.  (See
  14514.                        13.7.2.)
  14515. P'SUCC                 For a prefix P  that  denotes  a  discrete  type  or
  14516.                        subtype:
  14517.                        This   attribute   is   a  function  with  a  single
  14518.                        parameter.  The actual parameter X must be  a  value
  14519.                        of  the base type of P.  The result type is the base
  14520.                        type of P.  The result is the value  whose  position
  14521.                        number    is  one  greater  than  that  of  X.   The
  14522.                        exception CONSTRAINT_ERROR is  raised  if  X  equals
  14523.                        P'BASE'LAST.  (See 3.5.5.)
  14524. P'TERMINATED           For a prefix P that is appropriate for a task  type:
  14525.                        Yields  the  value TRUE if the task P is terminated;
  14526.                        yields the value FALSE otherwise.  The value of this
  14527.                        attribute is of the predefined type  BOOLEAN.   (See
  14528.                        9.9.)
  14529. P'VAL                  For a prefix P  that  denotes  a  discrete  type  or
  14530.                        subtype:
  14531.                        This  attribute  is a special function with a single
  14532.                        parameter X which can be of any integer  type.   The
  14533.                        result  type  is  the base type of P.  The result is
  14534.                        the   value   whose   position   number    is    the
  14535.                        universal_integer  value  corresponding  to  X.  The
  14536.                        exception  CONSTRAINT_ERROR   is   raised   if   the
  14537.                        universal_integer value corresponding to X is not in
  14538.                        the range P'POS(P'BASE'FIRST) .. P'POS(P'BASE'LAST).
  14539.                        (See 3.5.5.)
  14540. P'VALUE                For a prefix P  that  denotes  a  discrete  type  or
  14541.                        subtype:
  14542.                        This   attribute   is   a  function  with  a  single
  14543.                        parameter.  The actual parameter X must be  a  value
  14544.                        of  the  predefined type STRING.  The result type is
  14545.                        the base type of P.  Any leading  and  any  trailing
  14546.                        spaces   of   the   sequence   of   characters  that
  14547.                        corresponds to X  are ignored.
  14548.                        For  an  enumeration  type,  if  the   sequence   of
  14549.                        characters  has the syntax of an enumeration literal
  14550.                        and if this literal exists for the base type  of  P,
  14551.                        the  result  is the corresponding enumeration value.
  14552.                        For an integer type, if the sequence  of  characters
  14553.                        has  the  syntax  of  an  integer  literal,  with an
  14554.                        optional single leading character that is a plus  or
  14555.                        minus sign, and if there is a corresponding value in
  14556.                        the  base  type  of P, the result is this value.  In
  14557.                        any other case, the  exception  CONSTRAINT_ERROR  is
  14558.                        raised.  (See 3.5.5.)
  14559. P'WIDTH                For a prefix P that denotes a discrete  subtype:
  14560.                        Yields  the  maximum image length over all values of
  14561.                        the  subtype  P  (the  image  is  the  sequence   of
  14562.                        characters  returned  by  the attribute IMAGE).  The
  14563.                        value   of   this   attribute   is   of   the   type
  14564.                        universal_integer.  (See 3.5.5.)
  14565. :1600
  14566. B.      \uPredefined Language Pragmas\n
  14567. This annex defines the pragmas LIST, PAGE, and OPTIMIZE, and summarizes the
  14568. definitions given elsewhere of the remaining language-defined pragmas.
  14569. Pragma                                   Meaning
  14570. CONTROLLED     Takes the simple name  of  an  access  type  as  the  single
  14571.                argument.   This  pragma  is only allowed immediately within
  14572.                the declarative part or package specification that  contains
  14573.                the  declaration  of  the access type;  the declaration must
  14574.                occur before the pragma.  This pragma is not allowed  for  a
  14575.                derived  type.  This pragma specifies that automatic storage
  14576.                reclamation must not be performed for objects designated  by
  14577.                values of the access type, except upon leaving the innermost
  14578.                block statement, subprogram body, or task body that encloses
  14579.                the  access  type  declaration,  or  after  leaving the main
  14580.                program (see 4.8).
  14581. ELABORATE      Takes one or more simple names  denoting  library  units  as
  14582.                arguments.   This  pragma  is only allowed immediately after
  14583.                the  context  clause  of  a  compilation  unit  (before  the
  14584.                subsequent  library  unit or secondary unit).  Each argument
  14585.                must be the simple name of a library unit mentioned  by  the
  14586.                context    clause.    This   pragma   specifies   that   the
  14587.                corresponding library unit body must  be  elaborated  before
  14588.                the  given  compilation unit.  If the given compilation unit
  14589.                is a subunit, the  library  unit  body  must  be  elaborated
  14590.                before  the body of the ancestor library unit of the subunit
  14591.                (see 10.5).
  14592. INLINE         Takes one or more names as arguments;  each name  is  either
  14593.                the   name  of  a  subprogram  or  the  name  of  a  generic
  14594.                subprogram.  This pragma is only allowed at the place  of  a
  14595.                declarative   item   in   a   declarative  part  or  package
  14596.                specification, or after a library unit in a compilation, but
  14597.                before  any  subsequent  compilation  unit.    This   pragma
  14598.                specifies  that  the  subprogram  bodies  should be expanded
  14599.                inline at each call  whenever possible;  in the  case  of  a
  14600.                generic  subprogram,  the  pragma  applies  to  calls of its
  14601.                instantiations (see 6.3.2).
  14602. INTERFACE      Takes a language name and a subprogram  name  as  arguments.
  14603.                This  pragma  is allowed at the place of a declarative item,
  14604.                and must apply in this case to a subprogram declared  by  an
  14605.                earlier  declarative  item  of  the same declarative part or
  14606.                package specification.  This pragma is also  allowed  for  a
  14607.                library unit;  in this case the pragma must appear after the
  14608.                subprogram    declaration,   and   before   any   subsequent
  14609.                compilation unit.  This pragma specifies the other  language
  14610.                (and  thereby  the  calling  conventions)  and  informs  the
  14611.                compiler that an object module  will  be  supplied  for  the
  14612.                corresponding subprogram (see 13.9).
  14613. LIST           Takes one of  the  identifiers  ON  or  OFF  as  the  single
  14614.                argument.   This  pragma  is  allowed  anywhere  a pragma is
  14615.                allowed.  It specifies that listing of the compilation is to
  14616.                be continued or suspended  until  a  LIST  pragma  with  the
  14617.                opposite argument is given within the same compilation.  The
  14618.                pragma  itself is always listed if the compiler is producing
  14619.                a listing.
  14620. MEMORY_SIZE    Takes a numeric literal as the single argument.  This pragma
  14621.                is only allowed at the start of a  compilation,  before  the
  14622.                first  compilation  unit  (if  any) of the compilation.  The
  14623.                effect of this pragma is to use the value of  the  specified
  14624.                numeric  literal  for  the  definition  of  the named number
  14625.                MEMORY_SIZE (see 13.7).
  14626. OPTIMIZE       Takes one of the identifiers TIME or  SPACE  as  the  single
  14627.                argument.   This pragma is only allowed within a declarative
  14628.                part and it applies to  the  block  or  body  enclosing  the
  14629.                declarative part.  It specifies whether time or space is the
  14630.                primary optimization criterion.
  14631. PACK           Takes the simple name of a  record  or  array  type  as  the
  14632.                single  argument. The allowed positions for this pragma, and
  14633.                the restrictions on the named type, are governed by the same
  14634.                rules as for a representation clause. The  pragma  specifies
  14635.                that  storage minimization should be the main criterion when
  14636.                selecting the representation of the given type  (see  13.1).
  14637. PAGE           This pragma has no  argument,  and  is  allowed  anywhere  a
  14638.                pragma is allowed.  It specifies that the program text which
  14639.                follows  the  pragma  should  start  on  a  new page (if the
  14640.                compiler is currently producing a listing).
  14641. PRIORITY       Takes a static expression of the predefined integer  subtype
  14642.                PRIORITY  as  the  single  argument.   This  pragma  is only
  14643.                allowed  within  the  specification  of  a  task   unit   or
  14644.                immediately  within the outermost declarative part of a main
  14645.                program.  It specifies the priority of the task (or tasks of
  14646.                the task type) or the priority  of  the  main  program  (see
  14647.                9.8).
  14648. SHARED         Takes the simple name of a variable as the single  argument.
  14649.                This  pragma  is  allowed only for a variable declared by an
  14650.                object declaration and whose type  is  a  scalar  or  access
  14651.                type;   the  variable  declaration  and the pragma must both
  14652.                occur  (in  this  order)   immediately   within   the   same
  14653.                declarative  part  or  package  specification.   This pragma
  14654.                specifies that every read or update of  the  variable  is  a
  14655.                synchronization  point for that variable.  An implementation
  14656.                must restrict the objects for which this pragma  is  allowed
  14657.                to  objects  for  which  each  of  direct reading and direct
  14658.                updating is implemented as  an  indivisible  operation  (see
  14659.                9.11).
  14660. STORAGE_UNIT   Takes a numeric literal as the single argument.  This pragma
  14661.                is  only  allowed  at the start of a compilation, before the
  14662.                first compilation unit (if any)  of  the  compilation.   The
  14663.                effect  of  this pragma is to use the value of the specified
  14664.                numeric literal for  the  definition  of  the  named  number
  14665.                STORAGE_UNIT (see 13.7).
  14666. SUPPRESS       Takes as arguments the identifier of a check and  optionally
  14667.                also  the  name  of  either  an object, a type or subtype, a
  14668.                subprogram, a task unit, or a generic unit.  This pragma  is
  14669.                only allowed either immediately within a declarative part or
  14670.                immediately  within  a package specification.  In the latter
  14671.                case, the only allowed form is with a name that  denotes  an
  14672.                entity   (or   several   overloaded   subprograms)  declared
  14673.                immediately   within   the   package   specification.    The
  14674.                permission to omit the given check extends from the place of
  14675.                the  pragma  to the end of the declarative region associated
  14676.                with the innermost  enclosing  block  statement  or  program
  14677.                unit.   For  a  pragma given in a package specification, the
  14678.                permission extends to the end of  the  scope  of  the  named
  14679.                entity.
  14680.                If  the  pragma  includes a name, the permission to omit the
  14681.                given check is further restricted:  it  is  given  only  for
  14682.                operations on the named object or on all objects of the base
  14683.                type  of  a  named  type  or  subtype;  for calls of a named
  14684.                subprogram;  for activations of  tasks  of  the  named  task
  14685.                type;   or for instantiations of the given generic unit (see
  14686.                11.7).
  14687. SYSTEM_NAME    Takes an enumeration literal as the  single  argument.  This
  14688.                pragma is only allowed at the start of a compilation, before
  14689.                the first compilation unit (if any) of the compilation.  The
  14690.                effect of this pragma is to use the enumeration literal with
  14691.                the  specified identifier for the definition of the constant
  14692.                SYSTEM_NAME.  This pragma is only allowed if  the  specified
  14693.                identifier  corresponds  to  one of the literals of the type
  14694.                NAME declared in the package SYSTEM (see 13.7).
  14695. :1700
  14696. C.      \uPredefined Language Environment\n
  14697. This  annex  outlines  the specification of the package STANDARD containing
  14698. all predefined identifiers in the language.  The corresponding package body
  14699. is implementation-defined and is not shown.
  14700. The operators that are predefined for the types  declared  in  the  package
  14701. STANDARD are given in comments since they are implicitly declared.  Italics
  14702. are  used for  pseudo-names of anonymous types (such as universal_real) and
  14703. for   undefined   information   (such   as    implementation_defined    and
  14704. any_fixed_point_type).
  14705. package STANDARD is
  14706.    type BOOLEAN is (FALSE, TRUE);
  14707.    -- The predefined relational operators for this type are as follows:
  14708.    -- function "="   (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14709.    -- function "/="  (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14710.    -- function "<"   (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14711.    -- function "<="  (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14712.    -- function ">"   (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14713.    -- function ">="  (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14714.    -- The predefined logical operators and the predefined logical  negation
  14715.       operator are as follows:
  14716.    -- function "and" (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14717.    -- function "or"  (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14718.    -- function "xor" (LEFT, RIGHT : BOOLEAN) return BOOLEAN;
  14719.    -- function "not" (RIGHT : BOOLEAN) return BOOLEAN;
  14720.    -- The universal type universal_integer is predefined.
  14721.    type INTEGER is implementation_defined;
  14722.    -- The predefined operators for this type are as follows:
  14723.    -- function "="  (LEFT, RIGHT : INTEGER) return BOOLEAN;
  14724.    -- function "/=" (LEFT, RIGHT : INTEGER) return BOOLEAN;
  14725.    -- function "<"  (LEFT, RIGHT : INTEGER) return BOOLEAN;
  14726.    -- function "<=" (LEFT, RIGHT : INTEGER) return BOOLEAN;
  14727.    -- function ">"  (LEFT, RIGHT : INTEGER) return BOOLEAN;
  14728.    -- function ">=" (LEFT, RIGHT : INTEGER) return BOOLEAN;
  14729.    -- function "+"   (RIGHT : INTEGER) return INTEGER;
  14730.    -- function "-"   (RIGHT : INTEGER) return INTEGER;
  14731.    -- function "\uabs\n" (RIGHT : INTEGER) return INTEGER;
  14732.    -- function "+"   (LEFT, RIGHT : INTEGER) return INTEGER;
  14733.    -- function "-"   (LEFT, RIGHT : INTEGER) return INTEGER;
  14734.    -- function "*"   (LEFT, RIGHT : INTEGER) return INTEGER;
  14735.    -- function "/"   (LEFT, RIGHT : INTEGER) return INTEGER;
  14736.    -- function "rem" (LEFT, RIGHT : INTEGER) return INTEGER;
  14737.    -- function "mod" (LEFT, RIGHT : INTEGER) return INTEGER;
  14738.    -- function "**"  (LEFT : INTEGER; RIGHT : INTEGER) return INTEGER;
  14739.    -- An  implementation  may  provide additional predefined integer types.
  14740.    -- It is recommended that  the  names  of such additional types end with
  14741.    -- INTEGER as in SHORT_INTEGER  or  LONG_INTEGER.  The  specification of
  14742.    -- each operator for the type universal_integer, or for  any  additional
  14743.    -- predefined  integer   type,  is  obtained  by  replacing  INTEGER  by
  14744.    -- the   name  of the type  in  the specification  of  the corresponding
  14745.    -- operator  of the type INTEGER, except  for the  right  operand of the
  14746.    -- exponentiating operator.
  14747.    -- The universal type universal_real is predefined.
  14748.    type FLOAT is implementation_defined;
  14749.    -- The predefined operators for this type are as follows:
  14750.    -- function "="   (LEFT, RIGHT : FLOAT) return BOOLEAN;
  14751.    -- function "/="  (LEFT, RIGHT : FLOAT) return BOOLEAN;
  14752.    -- function "<"   (LEFT, RIGHT : FLOAT) return BOOLEAN;
  14753.    -- function "<="  (LEFT, RIGHT : FLOAT) return BOOLEAN;
  14754.    -- function ">"   (LEFT, RIGHT : FLOAT) return BOOLEAN;
  14755.    -- function ">="  (LEFT, RIGHT : FLOAT) return BOOLEAN;
  14756.    -- function "+"   (RIGHT : FLOAT) return FLOAT;
  14757.    -- function "-"   (RIGHT : FLOAT) return FLOAT;
  14758.    -- function "\uabs\n" (RIGHT : FLOAT) return FLOAT;
  14759.    -- function "+"   (LEFT, RIGHT : FLOAT) return FLOAT;
  14760.    -- function "-"   (LEFT, RIGHT : FLOAT) return FLOAT;
  14761.    -- function "*"   (LEFT, RIGHT : FLOAT) return FLOAT;
  14762.    -- function "/"   (LEFT, RIGHT : FLOAT) return FLOAT;
  14763.    -- function "**"  (LEFT : FLOAT; RIGHT : INTEGER) return FLOAT;
  14764.    -- An implementation may provide  additional  predefined  floating point
  14765.    -- point  types.   It is recommended that the names of  such  additional
  14766.    -- types   end   with   FLOAT  as  in  SHORT_FLOAT  or  LONG_FLOAT.  The
  14767.    -- specification of each operator for the type  universal_real,  or  for
  14768.    -- any  additional  predefined  floating  point  type,  is  obtained  by
  14769.    -- replacing  FLOAT by the name of  the type in the specification of the
  14770.    -- corresponding  operator  of  the  type  FLOAT.
  14771.    -- In  addition,  the  following operators are predefined for  universal
  14772.       types:
  14773.    -- function "*" (LEFT : universal_integer; RIGHT : universal_real)
  14774.       return universal_real;
  14775.    -- function "*" (LEFT : universal_real;    RIGHT : universal_integer)
  14776.       return universal_real;
  14777.    -- function "/" (LEFT : universal_real;    RIGHT : universal_integer)
  14778.       return universal_real;
  14779.    -- The  type universal_fixed is predefined.  The only operators declared
  14780.       for this type are
  14781.    -- function "*" (LEFT : any_fixed_point_type; RIGHT :
  14782.       any_fixed_point_type)
  14783.       return universal_fixed;
  14784.    -- function "/" (LEFT : any_fixed_point_type; RIGHT :
  14785.       any_fixed_point_type)
  14786.       return universal_fixed;
  14787.   --  The  following  characters  form  the  standard  ASCII character set.
  14788.       set.   Character  literals -- corresponding to control characters are
  14789.       not  identifiers;   they  are  indicated  in  italics  in this
  14790.       definition.
  14791.    type CHARACTER is
  14792.           (nul,  soh,  stx,  etx,     eot,  enq,  ack,  bel,
  14793.            bs,   ht,   lf,   vt,      ff,   cr,   so,   si,
  14794.            dle,  dc1,  dc2,  dc3,     dc4,  nak,  syn,  etb,
  14795.            can,  em,   sub,  esc,     fs,   gs,   rs,   us,
  14796.            ' ',  '!',  '"',  '#',     '$',  '%',  '&',  ''',
  14797.            '(',  ')',  '*',  '+',     ',',  '-',  '.',  '/',
  14798.            '0',  '1',  '2',  '3',     '4',  '5',  '6',  '7',
  14799.            '8',  '9',  ':',  ';',     '<',  '=',  '>',  '?',
  14800.            '@',  'A',  'B',  'C',     'D',  'E',  'F',  'G',
  14801.            'H',  'I',  'J',  'K',     'L',  'M',  'N',  'O',
  14802.            'P',  'Q',  'R',  'S',     'T',  'U',  'V',  'W',
  14803.            'X',  'Y',  'Z',  '[',     '\',  ']',  '~',  '_',
  14804.            '`',  'a',  'b',  'c',     'd',  'e',  'f',  'g',
  14805.            'h',  'i',  'j',  'k',     'l',  'm',  'n',  'o',
  14806.            'p',  'q',  'r',  's',     't',  'u',  'v',  'w',
  14807.            'x',  'y',  'z',  '{',     '|',  '}',  '~',  del);
  14808.   for CHARACTER use  --  128 ASCII character set without holes
  14809.        (0, 1, 2, 3, 4, 5, ..., 125, 126, 127);
  14810.   -- The predefined operators for the type CHARACTER are the  same  as  for
  14811.      any enumeration type.
  14812.   package ASCII is
  14813.       --  Control characters:
  14814.   NUL   : constant CHARACTER := nul;     SOH   : constant CHARACTER := soh:
  14815.   STX   : constant CHARACTER := stx;     ETX   : constant CHARACTER := etx;
  14816.   EOT   : constant CHARACTER := eot;     ENQ   : constant CHARACTER := enq:
  14817.   ACK   : constant CHARACTER := ack;     BEL   : constant CHARACTER := bel;
  14818.   BS    : constant CHARACTER := bs;      HT    : constant CHARACTER := ht;
  14819.   LF    : constant CHARACTER := lf;      VT    : constant CHARACTER := vt;
  14820.   FF    : constant CHARACTER := ff;      CR    : constant CHARACTER := cr;
  14821.   SO    : constant CHARACTER := so;      SI    : constant CHARACTER := si;
  14822.   DLE   : constant CHARACTER := dle;     DC1   : constant CHARACTER := dc1;
  14823.   DC2   : constant CHARACTER := dc2;     DC3   : constant CHARACTER := dc3;
  14824.   DC4   : constant CHARACTER := dc4;     NAK   : constant CHARACTER := nak;
  14825.   SYN   : constant CHARACTER := syn;     ETB   : constant CHARACTER := etb;
  14826.   CAN   : constant CHARACTER := can;     EM    : constant CHARACTER := em:
  14827.   SUB   : constant CHARACTER := sub;     ESC   : constant CHARACTER := esc;
  14828.   FS    : constant CHARACTER := fs;      GS    : constant CHARACTER := gs;
  14829.   RS    : constant CHARACTER := rs;      US    : constant CHARACTER := us;
  14830.   DEL   : constant CHARACTER := del;
  14831.       -- Other characters:
  14832. EXCLAM    : constant CHARACTER := '!';
  14833. QUOTATION : constant CHARACTER := '"';
  14834. SHARP     : constant CHARACTER := '#';
  14835. DOLLAR    : constant CHARACTER := '$';
  14836. PERCENT   : constant CHARACTER := '%';
  14837. AMPERSAND : constant CHARACTER := '&';
  14838. COLON     : constant CHARACTER := ':';
  14839. SEMICOLON : constant CHARACTER := ';';
  14840. QUERY     : constant CHARACTER := '?';
  14841. AT_SIGN   : constant CHARACTER := '@';
  14842. L_BRACKET : constant CHARACTER := '[';
  14843. BACK_SLASH: constant CHARACTER := '\';
  14844. R_BRACKET : constant CHARACTER := ']';
  14845. CIRCUMFLEX: constant CHARACTER := '~';
  14846. UNDERLINE : constant CHARACTER := '_';
  14847. GRAVE     : constant CHARACTER := '`';
  14848. L_BRACE   : constant CHARACTER := '{';
  14849. BAR       : constant CHARACTER := '|';
  14850. R_BRACE   : constant CHARACTER := '}';
  14851. TILDE     : constant CHARACTER := '~';
  14852.       -- Lower case letters:
  14853.       LC_A : constant CHARACTER := 'a';
  14854.       ...
  14855.       LC_Z : constant CHARACTER := 'z';
  14856.    end ASCII;
  14857.        -- Predefined subtypes:
  14858.        subtype NATURAL  is INTEGER range 0 .. INTEGER'LAST;
  14859.        subtype POSITIVE is INTEGER range 1 .. INTEGER'LAST;
  14860.        -- Predefined string type:
  14861.        type STRING is \uarray\n(POSITIVE range <>) of CHARACTER;
  14862.        pragma PACK(STRING);
  14863.        -- The predefined operators for this type are as follows:
  14864.        -- function "="  (LEFT, RIGHT : STRING) return BOOLEAN;
  14865.        -- function "/=" (LEFT, RIGHT : STRING) return BOOLEAN;
  14866.        -- function "<"  (LEFT, RIGHT : STRING) return BOOLEAN;
  14867.        -- function "<=" (LEFT, RIGHT : STRING) return BOOLEAN;
  14868.        -- function ">"  (LEFT, RIGHT : STRING) return BOOLEAN;
  14869.        -- function ">=" (LEFT, RIGHT : STRING) return BOOLEAN;
  14870.        -- function "&" (LEFT : STRING;    RIGHT : STRING)    return STRING;
  14871.        -- function "&" (LEFT : CHARACTER; RIGHT : STRING)    return STRING;
  14872.        -- function "&" (LEFT : STRING;    RIGHT : CHARACTER) return STRING;
  14873.        -- function "&" (LEFT : CHARACTER; RIGHT : CHARACTER) return STRING;
  14874. type DURATION is delta implementation_defined range implementation_defined;
  14875.     -- The  predefined  operators for the type DURATION are the same as for
  14876.        any fixed point type.
  14877.     -- The predefined exceptions:
  14878.    CONSTRAINT_ERROR : exception;
  14879.    NUMERIC_ERROR    : exception;
  14880.    PROGRAM_ERROR    : exception;
  14881.    STORAGE_ERROR    : exception;
  14882.    TASKING_ERROR    : exception;
  14883. end STANDARD;
  14884. Certain  aspects  of the predefined entities cannot be completely described
  14885. in the language itself.  For example, although the enumeration type BOOLEAN
  14886. can be written showing the two enumeration literals  FALSE  and  TRUE,  the
  14887. short-circuit control forms cannot be expressed in the language.
  14888. Note:
  14889. The language definition predefines the following library units:
  14890.     -  The package CALENDAR                         (see 9.6)
  14891.     -  The package SYSTEM                           (see 13.7)
  14892.     -  The package MACHINE_CODE (if provided)       (see 13.8)
  14893.     -  The generic procedure UNCHECKED_DEALLOCATION (see 13.10.1)
  14894.     -  The generic function UNCHECKED_CONVERSION    (see 13.10.2)
  14895.     -  The generic package SEQUENTIAL_IO            (see 14.2.3)
  14896.     -  The generic package DIRECT_IO                (see 14.2.5)
  14897.     -  The package TEXT_IO                          (see 14.3.10)
  14898.     -  The package IO_EXCEPTIONS                    (see 14.5)
  14899.     -  The package LOW_LEVEL_IO                     (see 14.6)
  14900. :1800
  14901. D.      \uGlossary\n
  14902. This  appendix is informative and is not part of the standard definition of
  14903. the  Ada  programming  language.   Italicized  terms  in  the   abbreviated
  14904. descriptions below either have glossary entries themselves or are described
  14905. in entries for related terms.
  14906. Accept statement.  See entry.
  14907. Access  type.  A value of an access type (an access value) is either a null
  14908. value, or a value that designates an object created by an  allocator.   The
  14909. designated  object  can  be  read  and  updated  via the access value.  The
  14910. definition of an access type specifies the type of the  objects  designated
  14911. by values of the access type.  See also collection.
  14912. Actual parameter.  See parameter.
  14913. Aggregate.   The  evaluation  of an aggregate yields a value of a composite
  14914. type.  The  value  is  specified  by  giving  the  value  of  each  of  the
  14915. components.  Either positional association or named association may be used
  14916. to indicate which value is associated with which component.
  14917. Allocator.   The evaluation of an allocator creates an object and returns a
  14918. new access value which designates the object.
  14919. Array type.  A value of an array type consists of components which are  all
  14920. of  the  same  subtype  (and  hence,  of the same type).  Each component is
  14921. uniquely distinguished by an index (for a one-dimensional array)  or  by  a
  14922. sequence  of  indices (for a multidimensional array).  Each index must be a
  14923. value of a discrete type and must lie in the correct index range.
  14924. Assignment.  Assignment is the operation that replaces the current value of
  14925. a variable by a new value.  An assignment statement specifies a variable on
  14926. the left, and on the right, an expression whose value  is  to  be  the  new
  14927. value of the variable.
  14928. Attribute.    The   evaluation   of   an   attribute  yields  a  predefined
  14929. characteristic of a named entity;  some attributes are functions.
  14930. Block statement.  A block statement is a single statement that may  contain
  14931. a  sequence  of  statements.   It  may also include a declarative part, and
  14932. exception handlers;  their effects are local to the block statement.
  14933. Body.  A body defines the execution of a subprogram, package, or  task.   A
  14934. body  stub  is a form of body that indicates that this execution is defined
  14935. in a separately compiled subunit.
  14936. Collection.   A  collection  is  the  entire  set  of  objects  created  by
  14937. evaluation of allocators for an access type.
  14938. Compilation  unit.   A compilation unit is the declaration or the body of a
  14939. program unit, presented for compilation as  an  independent  text.   It  is
  14940. optionally  preceded  by  a  context clause, naming other compilation units
  14941. upon which it depends by means of one more with clauses.
  14942. Component.  A component is a value that is a part of a larger value, or  an
  14943. object that is part of a larger object.
  14944. Composite  type.   A  composite  type  is one whose values have components.
  14945. There are two kinds of composite type:  array types and record types.
  14946. Constant.  See object.
  14947. Constraint.  A constraint determines a subset of the values of a  type.   A
  14948. value in that subset satisfies the constraint.
  14949. Context clause.  See compilation unit.
  14950. Declaration.   A  declaration  associates  an  identifier  (or  some  other
  14951. notation) with an entity.  This association is in effect within a region of
  14952. text  called  the  scope  of  the  declaration.   Within  the  scope  of  a
  14953. declaration, there are places where it is possible to use the identifier to
  14954. refer  to the associated declared entity.  At such places the identifier is
  14955. said to be a simple name of the entity;  the name is  said  to  denote  the
  14956. associated entity.
  14957. Declarative  Part.   A  declarative part is a sequence of declarations.  It
  14958. may  also  contain  related  information  such  as  subprogram  bodies  and
  14959. representation clauses.
  14960. Denote.  See declaration.
  14961. Derived  Type.   A  derived  type is a type whose operations and values are
  14962. replicas of those of an existing type.  The existing  type  is  called  the
  14963. parent type of the derived type.
  14964. Designate.  See access type, task.
  14965. Direct visibility.  See visibility.
  14966. Discrete  Type.   A  discrete  type  is  a type which has an ordered set of
  14967. distinct values.  The discrete types are the enumeration and integer types.
  14968. Discrete types are used for indexing and iteration, and for choices in case
  14969. statements and record variants.
  14970. Discriminant.  A discriminant is a distinguished component of an object  or
  14971. value  of  a  record type.  The subtypes of other components, or even their
  14972. presence or absence, may depend on the value of the discriminant.
  14973. Discriminant constraint.  A discriminant constraint on  a  record  type  or
  14974. private type specifies a value for each discriminant of the type.
  14975. Elaboration.   The elaboration of a declaration is the process by which the
  14976. declaration achieves its effect (such as creating an object);  this process
  14977. occurs during program execution.
  14978. Entry.  An entry is used for communication between tasks.  Externally,   an
  14979. entry  is  called just as a subprogram is called;  its internal behavior is
  14980. specified by one or more accept statements specifying  the  actions  to  be
  14981. performed when the entry is called.
  14982. Enumeration type.  An enumeration type is a discrete  type whose values are
  14983. represented  by enumeration literals which are given explicitly in the type
  14984. declaration.   These  enumeration  literals  are  either   identifiers   or
  14985. character literals.
  14986. Evaluation.   The  evaluation  of an expression is the process by which the
  14987. value of the expression is computed.  This process  occurs  during  program
  14988. execution.
  14989. Exception.   An  exception  is  an  error  situation which may arise during
  14990. program execution.  To raise an exception  is  to  abandon  normal  program
  14991. execution  so  as  to  signal that the error has taken place.  An exception
  14992. handler is  a  portion  of  program  text  specifying  a  response  to  the
  14993. exception.   Execution  of  such  a  program  text  is  called handling the
  14994. exception.
  14995. Expanded name.  An expanded  name  denotes  an  entity  which  is  declared
  14996. immediately  within  some  construct.   An  expanded name has the form of a
  14997. selected component:  the prefix denotes the construct (a program unit;   or
  14998. a  block,  loop,  or accept statement);  the selector is the simple name of
  14999. the entity.
  15000. Expression.  An expression defines the computation of a value.
  15001. Fixed point type.  See real type.
  15002. Floating point type.  See real type.
  15003. Formal parameter.  See parameter.
  15004. Function.  See subprogram.
  15005. Generic unit.  A generic unit is a template either for a set of subprograms
  15006. or for a set of packages.   A  subprogram  or  package  created  using  the
  15007. template   is   called   an  instance  of  the  generic  unit.   A  generic
  15008. instantiation is the kind of  declaration  that  creates  an  instance.   A
  15009. generic   unit  is  written  as  a  subprogram  or  package  but  with  the
  15010. specification prefixed by a generic formal part which may  declare  generic
  15011. formal  parameters.   A  generic  formal  parameter  is  either  a  type, a
  15012. subprogram, or an object.  A generic unit is one of the  kinds  of  program
  15013. unit.
  15014. Handler.  See exception.
  15015. Index.  See array type.
  15016. Index  constraint.   An  index  constraint  for an array type specifies the
  15017. lower and upper bounds for each index range of the array type.
  15018. Indexed component.  An indexed component denotes a component in  an  array.
  15019. It is a form of name containing expressions which specify the values of the
  15020. indices  of  the  array component.  An indexed component may also denote an
  15021. entry in a family of entries.
  15022. Instance.  See generic unit.
  15023. Integer type.  An integer type is a discrete type  whose  values  represent
  15024. all integer numbers within a specific range.
  15025. Lexical  element.   A  lexical  element  is  an  identifier,  a  literal, a
  15026. delimiter, or a comment.
  15027. Limited type.  A limited type is a type for which  neither  assignment  nor
  15028. the  predefined  comparison  for equality is implicitly declared.  All task
  15029. types are limited.  A private type  can  be  defined  to  be  limited.   An
  15030. equality operator can be explicitly declared for a limited type.
  15031. Literal.     A  literal  represents a value literally, that is, by means of
  15032. letters and other characters.  A literal is either a  numeric  literal,  an
  15033. enumeration literal, a character literal, or a string literal.
  15034. Mode.  See parameter.
  15035. Model  number.   A model number is an exactly representable value of a real
  15036. type.  Operations of a real type are defined in terms of operations on  the
  15037. model  numbers  of  the  type.   The properties of the model numbers and of
  15038. their  operations   are   the   minimal   properties   preserved   by   all
  15039. implementations of the real type.
  15040. Name.   A  name  is a construct that stands for an entity:  it is said that
  15041. the name denotes the entity, and that the entity  is  the  meaning  of  the
  15042. name.  See also declaration, prefix.
  15043. Named  association.   A  named  association specifies the association of an
  15044. item with one or more positions in a list, by naming the positions.
  15045. Object.  An object contains a value.  A program creates an object either by
  15046. elaborating an object declaration  or  by  evaluating  an  allocator.   The
  15047. declaration  or  allocator specifies a type for the object:  the object can
  15048. only contain values of that type.
  15049. Operation.  An operation is an elementary action  associated  with  one  or
  15050. more  types.   It  is  either implicitly declared by the declaration of the
  15051. type, or it is a subprogram that has a parameter or result of the type.
  15052. Operator.  An operator is an operation which has one or  two  operands.   A
  15053. unary  operator is written before an operand;  a binary operator is written
  15054. between two operands.  This notation is a special kind  of  function  call.
  15055. An  operator  can be declared as a function.  Many operators are implicitly
  15056. declared by the declaration of a type (for example, most type  declarations
  15057. imply the declaration of the equality operator for values of the type).
  15058. Overloading.   An  identifier  can  have  several alternative meanings at a
  15059. given point in the program text:  this property is called overloading.  For
  15060. example, an overloaded  enumeration  literal  can  be  an  identifier  that
  15061. appears in the definitions of two or more enumeration types.  The effective
  15062. meaning   of  an  overloaded  identifier  is  determined  by  the  context.
  15063. Subprograms, aggregates,  allocators,  and  string  literals  can  also  be
  15064. overloaded.
  15065. Package.   A  package specifies a group of logically related entities, such
  15066. as types, objects of those types, and subprograms with parameters of  those
  15067. types.   It  is  written  as a package declaration and a package body.  The
  15068. package declaration has a visible part, containing the declarations of  all
  15069. entities that can be explicitly used outside the package.  It may also have
  15070. a   private   part   containing   structural   details  that  complete  the
  15071. specification of the visible entities, but which are irrelevant to the user
  15072. of the package.  The package body contains implementations  of  subprograms
  15073. (and  possibly  tasks  as  other  packages) that have been specified in the
  15074. package declaration.  A package is one of the kinds of program unit.
  15075. Parameter.  A parameter is one of the  named  entities  associated  with  a
  15076. subprogram,  entry,  or  generic  unit,  and  used  to communicate with the
  15077. corresponding subprogram body, accept statement or generic body.  A  formal
  15078. parameter is an identifier used to denote the named entity within the body.
  15079. An   actual   parameter  is  the  particular  entity  associated  with  the
  15080. corresponding formal parameter by a subprogram call, entry call, or generic
  15081. instantiation.  The mode  of  a  formal  parameter  specifies  whether  the
  15082. associated  actual  parameter supplies a value for the formal parameter, or
  15083. the formal supplies a  value  for  the  actual  parameter,  or  both.   The
  15084. association of actual parameters with formal parameters can be specified by
  15085. named  associations,  by  positional  associations,  or by a combination of
  15086. these.
  15087. Parent type.  See derived type.
  15088. Positional association.  A positional association specifies the association
  15089. of an item with a position in a list, by using the  same  position  in  the
  15090. text to specify the item.
  15091. Pragma.  A pragma conveys information to the compiler.
  15092. Prefix.   A  prefix  is used as the first part of certain kinds of name.  A
  15093. prefix is either a function call or a name.
  15094. Private part.  See package.
  15095. Private type.  A private type is a type whose structure and set  of  values
  15096. are clearly defined, but not directly available to the user of the type.  A
  15097. private  type is known only by its discriminants (if any) and by the set of
  15098. operations defined for it.  A private type and  its  applicable  operations
  15099. are  defined in the visible part of a package, or in a generic formal part.
  15100. Assignment, equality, and inequality are also defined  for  private  types,
  15101. unless the private type is limited.
  15102. Procedure.  See subprogram.
  15103. Program.   A  program  is composed of a number of compilation units, one of
  15104. which is a subprogram called the main program.  Execution  of  the  program
  15105. consists  of  execution  of  the main program, which may invoke subprograms
  15106. declared in the other compilation units of the program.
  15107. Program unit.  A program unit is  any  one  of  a  generic  unit,  package,
  15108. subprogram, or task unit.
  15109. Qualified  expression.  A qualified expression is an expression preceded by
  15110. an indication of its type or subtype.  Such qualification is used when,  in
  15111. its   absence,  the  expression  might  be  ambiguous  (for  example  as  a
  15112. consequence of overloading).
  15113. Raising an exception.  See exception.
  15114. Range.  A range is a contiguous set of values of a scalar type.  A range is
  15115. specified by giving the lower and upper bounds for the values.  A value  in
  15116. the range is said to belong to the range.
  15117. Range  constraint.   A  range  constraint  of a type specifies a range, and
  15118. thereby determines the subset of the values of the type that belong to  the
  15119. range.
  15120. Real  type.  A real type is a type whose values represent approximations to
  15121. the real numbers.  There are two kinds of real type:  fixed point types are
  15122. specified by absolute error bound;  floating point types are specified by a
  15123. relative error bound expressed as a number of significant  decimal  digits.
  15124. Record  type.   A  value  of a record type consists of components which are
  15125. usually of different types or subtypes.  For each  component  of  a  record
  15126. value  or  record  object,  the  definition of the record type specifies an
  15127. identifier that uniquely determines the component within the record.
  15128. Renaming declaration.  A renaming declaration declares another name for  an
  15129. entity.
  15130. Rendezvous.   A  rendezvous  is  the  interaction  that  occurs between two
  15131. parallel tasks when one task has called an entry of the other task,  and  a
  15132. corresponding  accept  statement  is  being  executed  by the other task on
  15133. behalf of the calling task.
  15134. Representation clause.  A representation clause directs the compiler in the
  15135. selection of the mapping of a type, an object, or a task onto  features  of
  15136. the   underlying   machine   that  executes  a  program.   In  some  cases,
  15137. representation clauses completely specify the  mapping;   in  other  cases,
  15138. they provide criteria for choosing a mapping.
  15139. Satisfy.  See constraint, subtype.
  15140. Scalar type.  An object or value of a scalar type does not have components.
  15141. A  scalar  type  is either a discrete type or a real type.  The values of a
  15142. scalar type are ordered.
  15143. Scope.  See declaration.
  15144. Selected component.  A selected component is a name consisting of a  prefix
  15145. and  of an identifier called the selector.  Selected components are used to
  15146. denote record components, entries, and objects designated by access values;
  15147. they are also used as expanded names.
  15148. Selector.  See selected component.
  15149. Simple name.  See declaration, name.
  15150. Statement.  A statement specifies one  or  more  actions  to  be  performed
  15151. during the execution of a program.
  15152. Subcomponent.   A  subcomponent  is  either  a component, or a component of
  15153. another subcomponent.
  15154. Subprogram.  A subprogram is either a procedure or a function.  A procedure
  15155. specifies a sequence  of  actions  and  is  invoked  by  a  procedure  call
  15156. statement.   A  function specifies a sequence of actions and also returns a
  15157. value called the result, and so  a  function  call  is  an  expression.   A
  15158. subprogram  is  written  as  a  subprogram declaration, which specifies its
  15159. name, formal parameters, and (for a function) its result;  and a subprogram
  15160. body  which  specifies  the  sequence  of  actions.   The  subprogram  call
  15161. specifies  the  actual parameters that are to be associated with the formal
  15162. parameters.  A subprogram is one of the kinds of program unit.
  15163. Subtype.  A subtype of a type characterizes a subset of the values  of  the
  15164. type.  The subset is determined by a constraint on the type.  Each value in
  15165. the  set  of  values  of a subtype belongs to the subtype and satisfies the
  15166. constraint determining the subtype.
  15167. Subunit.  See body.
  15168. Task.  A task operates in parallel with other parts of the program.  It  is
  15169. written  as  a task specification (which specifies the name of the task and
  15170. the names and formal parameters of its entries),  and  a  task  body  which
  15171. defines its execution.  A task unit is one of the kinds of program unit.  A
  15172. task  type  is a type that permits the subsequent declaration of any number
  15173. of similar tasks of the type.  A value of a task type is said to  designate
  15174. a task.
  15175. Type.   A  type characterizes both a set of values, and a set of operations
  15176. applicable to those values.  A type definition is a language construct that
  15177. defines a type.  A particular type is either an access type, an array type,
  15178. a private type, a record type, a scalar type, or a task type.
  15179. Use clause.  A use clause achieves direct visibility of  declarations  that
  15180. appear in the visible parts of named packages.
  15181. Variable.  See object.
  15182. Variant  part.   A  variant  part  of a record specifies alternative record
  15183. components, depending on a discriminant of the record.  Each value  of  the
  15184. discriminant establishes a particular alternative of the variant part.
  15185. Visibility.   At  a  given  point  in a program text, the declaration of an
  15186. entity with a certain identifier is said to be visible if the entity is  an
  15187. acceptable  meaning for an occurrence at that point of the identifier.  The
  15188. declaration is visible by selection at the  place  of  the  selector  in  a
  15189. selected  component  or  at  the  place of the name in a named association.
  15190. Otherwise, the declaration is directly visible, that is, if the  identifier
  15191. alone has that meaning.
  15192. Visible part.  See package.
  15193. With clause.  See compilation unit.
  15194. :1900
  15195. E.      \uSyntax Summary\n
  15196.     2.1
  15197.     graphic_character ::= basic_graphic_character
  15198.        | lower_case_letter | other_special_character
  15199.     basic_graphic_character ::=
  15200.          upper_case_letter | digit
  15201.        | special_character | space_character
  15202.     basic_character ::=
  15203.          basic_graphic_character | format_effector
  15204.     2.3
  15205.     identifier ::=
  15206.        letter {[underline] letter_or_digit}
  15207.     letter_or_digit ::= letter | digit
  15208.     letter ::= upper_case_letter | lower_case_letter
  15209.     2.4
  15210.     numeric_literal ::= decimal_literal | based_literal
  15211.     2.4.1
  15212.     decimal_literal ::= integer [.integer] [exponent]
  15213.     integer ::= digit {[underline] digit}
  15214.     exponent ::= E [+] integer | E - integer
  15215.     2.4.2
  15216.     based_literal ::=
  15217.        base # based_integer [.based_integer] # [exponent]
  15218.     base ::= integer
  15219.     based_integer ::=
  15220.        extended_digit {[underline] extended_digit}
  15221.     extended_digit ::= digit | letter
  15222.     2.5
  15223.     character_literal ::= 'graphic_character'
  15224.     2.6
  15225.     string_literal ::= "{graphic_character}"
  15226.     2.8
  15227.     pragma ::=
  15228.        pragma identifier [(argument_association
  15229.                                {, argument_association})];
  15230.     argument_association ::=
  15231.          [argument_identifier =>] name
  15232.        | [argument_identifier =>] expression
  15233.     3.1
  15234.     basic_declaration ::=
  15235.          object_declaration     | number_declaration
  15236.        | type_declaration       | subtype_declaration
  15237.        | subprogram_declaration | package_declaration
  15238.        | task_declaration       | generic_declaration
  15239.        | exception_declaration  | generic_instantiation
  15240.        | renaming_declaration   | deferred_constant_declaration
  15241.     3.2
  15242.     object_declaration ::=
  15243.          identifier_list : [constant] subtype_indication [:= expression];
  15244.        | identifier_list : [constant] constrained_array_definition
  15245.                                                          [:= expression];
  15246.     number_declaration ::=
  15247.          identifier_list : constant := universal_static_expression;
  15248.     identifier_list ::=  identifier {, identifier}
  15249.     3.3.1
  15250.     type_declaration ::=  full_type_declaration
  15251.        | incomplete_type_declaration | private_type_declaration
  15252.     full_type_declaration ::=
  15253.      type identifier [discriminant_part] is type_definition;
  15254.     type_definition ::=
  15255.          enumeration_type_definition | integer_type_definition
  15256.        | real_type_definition        | array_type_definition
  15257.        | record_type_definition      | access_type_definition
  15258.        | derived_type_definition
  15259.     3.3.2
  15260.     subtype_declaration ::=
  15261.        subtype identifier is subtype_indication;
  15262.     subtype_indication ::=  type_mark [constraint]
  15263.     type_mark ::= type_name | subtype_name
  15264.     constraint ::=
  15265.          range_constraint       | floating_point_constraint
  15266.        | fixed_point_constraint | index_constraint
  15267.        | discriminant_constraint
  15268.     3.4
  15269.     derived_type_definition ::= new subtype_indication
  15270.     3.5
  15271.     range_constraint ::=  range range
  15272.     range ::=  range_attribute
  15273.        | simple_expression .. simple_expression
  15274.     3.5.1
  15275.     enumeration_type_definition ::=
  15276.        (enumeration_literal_specification
  15277.           {, enumeration_literal_specification})
  15278.     enumeration_literal_specification ::=  enumeration_literal
  15279.     enumeration_literal ::=  identifier | character_literal
  15280.     3.5.4
  15281.     integer_type_definition ::=  range_constraint
  15282.     3.5.6
  15283.     real_type_definition ::=
  15284.        floating_point_constraint | fixed_point_constraint
  15285.     3.5.7
  15286.     floating_point_constraint ::=
  15287.        floating_accuracy_definition [range_constraint]
  15288.     floating_accuracy_definition ::=
  15289.        digits static_simple_expression
  15290.     3.5.9
  15291.     fixed_point_constraint ::=
  15292.        fixed_accuracy_definition [range_constraint]
  15293.     fixed_accuracy_definition ::=
  15294.        delta static_simple_expression
  15295.     3.6
  15296.     array_type_definition ::=
  15297.        unconstrained_array_definition | constrained_array_definition
  15298.     unconstrained_array_definition ::=
  15299.        \uarray\n(index_subtype_definition {, index_subtype_definition}) of
  15300.                 component_subtype_indication
  15301.     constrained_array_definition ::=
  15302.        \uarray\n index_constraint of component_subtype_indication
  15303.     index_subtype_definition ::= type_mark range <>
  15304.     index_constraint ::=  (discrete_range {, discrete_range})
  15305.     discrete_range ::= discrete_subtype_indication | range
  15306.     3.7
  15307.     record_type_definition ::=
  15308.        record
  15309.           component_list
  15310.        end record
  15311.     component_list ::=
  15312.           component_declaration {component_declaration}
  15313.        | {component_declaration} variant_part
  15314.        |  \unull\n;
  15315.     component_declaration ::=
  15316.        identifier_list : component_subtype_definition [:= expression];
  15317.     component_subtype_definition ::=  subtype_indication
  15318.     3.7.1
  15319.     discriminant_part ::=
  15320.        (discriminant_specification {; discriminant_specification})
  15321.     discriminant_specification ::=
  15322.        identifier_list : type_mark [:= expression]
  15323.     3.7.2
  15324.     discriminant_constraint ::=
  15325.        (discriminant_association {, discriminant_association})
  15326.     discriminant_association ::=
  15327.        [discriminant_simple_name {| discriminant_simple_name} =>]
  15328.                 expression
  15329.     3.7.3
  15330.     variant_part ::=
  15331.        case discriminant_simple_name is
  15332.            variant
  15333.           {variant}
  15334.        end case;
  15335.     variant ::=
  15336.        when choice {| choice} =>
  15337.           component_list
  15338.     choice ::= simple_expression
  15339.        | discrete_range | others | component_simple_name
  15340.     3.8
  15341.     access_type_definition ::= \uaccess\n subtype_indication
  15342.     3.8.1
  15343.     incomplete_type_declaration ::=
  15344.        type identifier [discriminant_part];
  15345.     3.9
  15346.     declarative_part ::=
  15347.        {basic_declarative_item} {later_declarative_item}
  15348.     basic_declarative_item ::= basic_declaration
  15349.        | representation_clause | use_clause
  15350.     later_declarative_item ::= body
  15351.        | subprogram_declaration | package_declaration
  15352.        | task_declaration       | generic_declaration
  15353.        | use_clause             | generic_instantiation
  15354.     body ::= proper_body | body_stub
  15355.     proper_body ::=
  15356.        subprogram_body | package_body | task_body
  15357.     4.1
  15358.     name ::= simple_name
  15359.        | character_literal  | operator_symbol
  15360.        | indexed_component  | slice
  15361.        | selected_component | attribute
  15362.     simple_name ::= identifier
  15363.     prefix ::= name | function_call
  15364.     4.1.1
  15365.     indexed_component ::= prefix(expression {, expression})
  15366.     4.1.2
  15367.     slice ::= prefix(discrete_range)
  15368.     4.1.3
  15369.     selected_component ::= prefix.selector
  15370.     selector ::= simple_name
  15371.        | character_literal | operator_symbol | \uall\n
  15372.     4.1.4
  15373.     attribute ::= prefix'attribute_designator
  15374.     attribute_designator ::=
  15375.        simple_name [(universal_static_expression)]
  15376.     4.3
  15377.     aggregate ::=
  15378.        (component_association {, component_association})
  15379.     component_association ::=
  15380.        [choice {| choice} => ] expression
  15381.     4.4
  15382.     expression ::=
  15383.          relation {and relation} | relation {\uand\n then relation}
  15384.        | relation {or relation}  | relation {or else relation}
  15385.        | relation {xor relation}
  15386.     relation ::=
  15387.          simple_expression [relational_operator simple_expression]
  15388.        | simple_expression [not] in range
  15389.        | simple_expression [not] in type_mark
  15390.     simple_expression ::=
  15391.        [unary_adding_operator] term {binary_adding_operator term}
  15392.     term ::= factor {multiplying_operator factor}
  15393.     factor ::= primary [** primary] | \uabs\n primary | not primary
  15394.     primary ::=
  15395.          numeric_literal | \unull\n | aggregate | string_literal
  15396.        | name | allocator | function_call | type_conversion
  15397.        | qualified_expression | (expression)
  15398.     4.5
  15399.     logical_operator  ::=  \uand\n | or | xor
  15400.     relational_operator  ::=  = | /= | < | <= | > | >=
  15401.     binary_adding_operator  ::=  + | - | &
  15402.     unary_adding_operator  ::=  + | -
  15403.     multiplying_operator  ::=  * | / | mod | rem
  15404.     highest_precedence_operator  ::=  ** | \uabs\n | not
  15405.     4.6
  15406.     type_conversion ::= type_mark(expression)
  15407.     4.7
  15408.     qualified_expression ::=
  15409.        type_mark'(expression) | type_mark'aggregate
  15410.     4.8
  15411.     allocator ::=
  15412.        new subtype_indication | new qualified_expression
  15413.     5.1
  15414.     sequence_of_statements ::= statement {statement}
  15415.     statement ::=
  15416.        {label} simple_statement | {label} compound_statement
  15417.     simple_statement ::= null_statement
  15418.        | assignment_statement | procedure_call_statement
  15419.        | exit_statement       | return_statement
  15420.        | goto_statement       | entry_call_statement
  15421.        | delay_statement      | abort_statement
  15422.        | raise_statement      | code_statement
  15423.     compound_statement ::=
  15424.          if_statement     | case_statement
  15425.        | loop_statement   | block_statement
  15426.        | accept_statement | select_statement
  15427.     label ::= <<label_simple_name>>
  15428.     null_statement ::= \unull\n;
  15429.     5.2
  15430.     assignment_statement ::=
  15431.        variable_name := expression;
  15432.     5.3
  15433.     if_statement ::=
  15434.         if condition then
  15435.           sequence_of_statements
  15436.        {elsif condition then
  15437.           sequence_of_statements}
  15438.        [else
  15439.           sequence_of_statements]
  15440.         end if;
  15441.     condition ::= boolean_expression
  15442.     5.4
  15443.     case_statement ::=
  15444.        case expression is
  15445.            case_statement_alternative
  15446.           {case_statement_alternative}
  15447.        end case;
  15448.     case_statement_alternative ::=
  15449.        when choice {| choice } =>
  15450.           sequence_of_statements
  15451.     5.5
  15452.     loop_statement ::=
  15453.        [loop_simple_name:]
  15454.           [iteration_scheme] loop
  15455.              sequence_of_statements
  15456.            end loop [loop_simple_name];
  15457.     iteration_scheme ::= while condition
  15458.        | for loop_parameter_specification
  15459.     loop_parameter_specification ::=
  15460.        identifier in [reverse] discrete_range
  15461.     5.6
  15462.     block_statement ::=
  15463.        [block_simple_name:]
  15464.           [declare
  15465.                declarative_part]
  15466.            begin
  15467.                sequence_of_statements
  15468.           [exception
  15469.                exception_handler
  15470.               {exception_handler}]
  15471.            end [block_simple_name];
  15472.     5.7
  15473.     exit_statement ::=
  15474.        exit [loop_name] [when condition];
  15475.     5.8
  15476.     return_statement ::= return [expression];
  15477.     5.9
  15478.     goto_statement ::= goto label_name;
  15479.     6.1
  15480.     subprogram_declaration ::= subprogram_specification;
  15481.     subprogram_specification ::=
  15482.          procedure identifier [formal_part]
  15483.        | function designator  [formal_part] return type_mark
  15484.     designator ::= identifier | operator_symbol
  15485.     operator_symbol ::= string_literal
  15486.     formal_part ::=
  15487.        (parameter_specification {; parameter_specification})
  15488.     parameter_specification ::=
  15489.        identifier_list : mode type_mark [:= expression]
  15490.     mode ::= [in] | in out | out
  15491.     6.3
  15492.     subprogram_body ::=
  15493.         subprogram_specification is
  15494.            [declarative_part]
  15495.         begin
  15496.             sequence_of_statements
  15497.        [exception
  15498.             exception_handler
  15499.            {exception_handler}]
  15500.         end [designator];
  15501.     6.4
  15502.     procedure_call_statement ::=
  15503.        procedure_name [actual_parameter_part];
  15504.     function_call ::=
  15505.        function_name [actual_parameter_part]
  15506.     actual_parameter_part ::=
  15507.        (parameter_association {, parameter_association})
  15508.     parameter_association ::=
  15509.        [formal_parameter =>] actual_parameter
  15510.     formal_parameter ::= parameter_simple_name
  15511.     actual_parameter ::=
  15512.        expression | variable_name | type_mark(variable_name)
  15513.     7.1
  15514.     package_declaration ::= package_specification;
  15515.     package_specification ::=
  15516.         package identifier is
  15517.           {basic_declarative_item}
  15518.        [private
  15519.           {basic_declarative_item}]
  15520.         end [package_simple_name]
  15521.     package_body ::=
  15522.         package body package_simple_name is
  15523.            [declarative_part]
  15524.        [begin
  15525.             sequence_of_statements
  15526.        [exception
  15527.             exception_handler
  15528.            {exception_handler}]]
  15529.         end [package_simple_name];
  15530.     7.4
  15531.     private_type_declaration ::=
  15532.        type identifier [discriminant_part] is [limited] private;
  15533.     deferred_constant_declaration ::=
  15534.        identifier_list : constant type_mark;
  15535.     8.4
  15536.     use_clause ::= use package_name {, package_name};
  15537.     8.5
  15538.     renaming_declaration ::=
  15539.          identifier : type_mark   renames object_name;
  15540.        | identifier : exception   renames exception_name;
  15541.        | package identifier       renames package_name;
  15542.        | subprogram_specification renames subprogram_or_entry_name;
  15543.     9.1
  15544.     task_declaration ::= task_specification;
  15545.     task_specification ::=
  15546.        task [type] identifier [is
  15547.           {entry_declaration}
  15548.           {representation_clause}
  15549.        end [task_simple_name]]
  15550.     task_body ::=
  15551.         task body task_simple_name is
  15552.            [declarative_part]
  15553.         begin
  15554.             sequence_of_statements
  15555.        [exception
  15556.             exception_handler
  15557.            {exception_handler}]
  15558.         end [task_simple_name];
  15559.     9.5
  15560.     entry_declaration ::=
  15561.        entry identifier [(discrete_range)] [formal_part];
  15562.     entry_call_statement ::=
  15563.        entry_name [actual_parameter_part];
  15564.     accept_statement ::=
  15565.        \uaccept\n entry_simple_name [(entry_index)] [formal_part] [do
  15566.           sequence_of_statements
  15567.        end [entry_simple_name]];
  15568.     entry_index ::= expression
  15569.     9.6
  15570.     delay_statement ::= delay simple_expression;
  15571.     9.7
  15572.     select_statement ::= selective_wait
  15573.        | conditional_entry_call | timed_entry_call
  15574.     9.7.1
  15575.     selective_wait ::=
  15576.         select
  15577.           select_alternative
  15578.        {or
  15579.           select_alternative}
  15580.        [else
  15581.           sequence_of_statements]
  15582.         end select;
  15583.     select_alternative ::=
  15584.        [when condition =>]
  15585.           selective_wait_alternative
  15586.     selective_wait_alternative ::= accept_alternative
  15587.        | delay_alternative | terminate_alternative
  15588.     accept_alternative  ::=
  15589.        accept_statement [sequence_of_statements]
  15590.     delay_alternative  ::=
  15591.        delay_statement [sequence_of_statements]
  15592.     terminate_alternative ::= terminate;
  15593.     conditional_entry_call ::=
  15594.        select
  15595.            entry_call_statement
  15596.           [sequence_of_statements]
  15597.        else
  15598.            sequence_of_statements
  15599.        end select;
  15600.     9.7.3
  15601.     timed_entry_call ::=
  15602.        select
  15603.            entry_call_statement
  15604.           [sequence_of_statements]
  15605.        or
  15606.            delay_alternative
  15607.        end select;
  15608.     9.10
  15609.     abort_statement ::= \uabort\n task_name {, task_name};
  15610.     10.1
  15611.     compilation ::= {compilation_unit}
  15612.     compilation_unit ::=
  15613.          context_clause library_unit
  15614.        | context_clause secondary_unit
  15615.     library_unit ::=
  15616.          subprogram_declaration | package_declaration
  15617.        | generic_declaration    | generic_instantiation
  15618.        | subprogram_body
  15619.     secondary_unit ::= library_unit_body | subunit
  15620.     library_unit_body ::= subprogram_body | package_body
  15621.     10.1.1
  15622.     context_clause ::= {with_clause {use_clause}}
  15623.     with_clause ::=
  15624.        with unit_simple_name {, unit_simple_name};
  15625.     10.2
  15626.     body_stub ::=
  15627.          subprogram_specification is separate;
  15628.        | package body package_simple_name is separate;
  15629.        | task body task_simple_name is separate;
  15630.     subunit ::= separate (parent_unit_name) proper_body
  15631.     11.1
  15632.     exception_declaration ::= identifier_list : exception;
  15633.     11.2
  15634.     exception_handler ::=
  15635.        when exception_choice {| exception_choice} =>
  15636.           sequence_of_statements
  15637.     exception_choice ::= exception_name | others
  15638.     11.3
  15639.     raise_statement ::= raise [exception_name];
  15640.     12.1
  15641.     generic_declaration ::= generic_specification;
  15642.     generic_specification ::=
  15643.          generic_formal_part subprogram_specification
  15644.        | generic_formal_part package_specification
  15645.     generic_formal_part ::= generic {generic_parameter_declaration}
  15646.     generic_parameter_declaration ::=
  15647.          identifier_list : [in [out]] type_mark [:= expression];
  15648.        | type identifier is generic_type_definition;
  15649.        | private_type_declaration
  15650.        | with subprogram_specification [is name];
  15651.        | with subprogram_specification [is <>];
  15652.     generic_type_definition ::=
  15653.          (<>) | range <> | digits <> | delta <>
  15654.        | array_type_definition | access_type_definition
  15655.     12.3
  15656.     generic_instantiation ::=
  15657.          package identifier is
  15658.              new generic_package_name [generic_actual_part];
  15659.        | procedure identifier is
  15660.              new generic_procedure_name [generic_actual_part];
  15661.        | function designator is
  15662.              new generic_function_name [generic_actual_part];
  15663.     generic_actual_part ::=
  15664.        (generic_association {, generic_association})
  15665.     generic_association ::=
  15666.        [generic_formal_parameter =>] generic_actual_parameter
  15667.     generic_formal_parameter ::=
  15668.        parameter_simple_name | operator_symbol
  15669.     generic_actual_parameter ::= expression | variable_name
  15670.        | subprogram_name | entry_name | type_mark
  15671.     13.1
  15672.     representation_clause ::=
  15673.          type_representation_clause | address_clause
  15674.     type_representation_clause ::= length_clause
  15675.        | enumeration_representation_clause
  15676.        | record_representation_clause
  15677.     13.2
  15678.     length_clause ::= for attribute use simple_expression;
  15679.     13.3
  15680.     enumeration_representation_clause ::=
  15681.        for type_simple_name use aggregate;
  15682.     13.4
  15683.     record_representation_clause ::=
  15684.        for type_simple_name use
  15685.           record [alignment_clause]
  15686.              {component_clause}
  15687.           end record;
  15688.     alignment_clause ::= at mod static_simple_expression;
  15689.     component_clause ::=
  15690.        component_name at static_simple_expression
  15691.                       range static_range;
  15692.     13.5
  15693.     address_clause ::=
  15694.        for simple_name use at simple_expression;
  15695.     13.8
  15696.     code_statement ::= type_mark'record_aggregate;
  15697. :2000
  15698. F.      \uImplementation-Dependent Characteristics\n
  15699. This appendix is not part of the standard definition of the Ada programming
  15700. language.
  15701. The  Ada  language  definition  allows for certain machine-dependences in a
  15702. controlled manner. No machine-dependent syntax or  semantic  extensions  or
  15703. restrictions  are  allowed.   The  only  allowed implementation-dependences
  15704. correspond to  implementation-dependent  pragmas  and  attributes,  certain
  15705. machine-dependent  conventions  as  mentioned  in  chapter  13, and certain
  15706. allowed restrictions on representation clauses.
  15707. The reference manual of each Ada implementation must  include  an  appendix
  15708. (called   Appendix   F)   that   describes   all   implementation-dependent
  15709. characteristics.  The appendix F for a given implementation  must  list  in
  15710. particular:
  15711. (1)  The form, allowed places, and effect of every implementation-dependent
  15712.      pragma.
  15713. (2)  The name and the type of every implementation-dependent attribute.
  15714. (3)  The specification of the package SYSTEM.
  15715. (4)  The list of all restrictions on representation clauses (see 13.1)
  15716. (5)  The conventions used for any  implementation-generated  name  denoting
  15717.      implementation-dependent components (see 13.4).
  15718. (6)  The interpretation of expressions  that  appear  in  address  clauses,
  15719.      including those for interrupts (see 13.5).
  15720. (7)  Any restriction on unchecked conversions (see 13.10.2).
  15721. (8)  Any  implementation-dependent  characteristics  of  the   input-output
  15722.      packages (see 14).
  15723.